mrk21 / firebrew Goto Github PK
View Code? Open in Web Editor NEWFirefox add-ons manager for CUI.
Home Page: https://rubygems.org/gems/firebrew
License: MIT License
Firefox add-ons manager for CUI.
Home Page: https://rubygems.org/gems/firebrew
License: MIT License
Throw the Firebrew::CommandLineError
as shown below:
$ firebrew invalid-command
...(Firebrew::CommandLineError)
from: path/to/error
...
The error shown below:
$ bundle exec ./bin/firebrew -f
#<OptionParser::MissingArgument: -f>
firebrew/lib/firebrew/command_line.rb:120:in `opt_operation'
firebrew/lib/firebrew/command_line.rb:63:in `initialize'
firebrew/lib/firebrew/command_line.rb:13:in `new'
firebrew/lib/firebrew/command_line.rb:13:in `execute'
./bin/firebrew:5:in `<main>'
#
In the current implementation. has been handle only the OptionParser::InvalidOption
exception, so will handle the all OptionParser
exceptions.
Will fix the points listed below:
The reason is that in the command execution part, the command is enclosed in double quotation marks. In this case, in spite of executing the command which is not existed, not throw the SystemCall
exception. In order to resolve this issue, will stop enclosing the command in double quotation marks and escape it.
Will add the attributes listed below:
The contents of the README is listed below:
Changes listed below:
The occurred errors listed below:
$ firebrew install 'Hatena Bookmark'
#<TypeError: no implicit conversion of Array into String>
lib/ruby/2.1.0/open-uri.rb:36:in `open'
lib/ruby/2.1.0/open-uri.rb:36:in `open'
lib/ruby/gems/2.1.0/gems/firebrew-0.1.1/lib/firebrew/firefox/extension.rb:45:in `install'
lib/ruby/gems/2.1.0/gems/firebrew-0.1.1/lib/firebrew/runner.rb:55:in `install'
lib/ruby/gems/2.1.0/gems/firebrew-0.1.1/lib/firebrew/command_line.rb:112:in `execute'
lib/ruby/gems/2.1.0/gems/firebrew-0.1.1/lib/firebrew/command_line.rb:12:in `execute'
lib/ruby/gems/2.1.0/gems/firebrew-0.1.1/bin/firebrew:5:in `<top (required)>'
bin/firebrew:23:in `load'
bin/firebrew:23:in `<main>'
In the current implementation, it has not assuming a case of when the install
element was equal or greater than two, so it will change as choosing a first element in the install
elements.
Will be use Faraday
instead of ActiveResource
.
Will newly create the Platform
class which return the current platform, and will pass the value obtained from that class to the Amo::Search
.
The reason is to not exist the extension.json
on the profile creation immediate aftermath.
For the currently implementation, throw the exception when the extension.json
not found, so throw the exception rather than create that.
The error message in the issue #10:
1) Firebrew::Firefox::Profile Manager #all() should construct records
Failure/Error: expect(subject[2].path).to eq('/path/to/abs_profile')
expected: "/path/to/abs_profile"
got: "Z:/path/to/abs_profile"
(compared using ==)
# ./spec/firebrew/firefox/profile_spec.rb:36:in `block (4 levels) in <module:Firefox>'
It should be changed as shown below:
before:
expect(subject[2].path).to eq('/path/to/abs_profile')
after:
expect(subject[2].path).to eq(File.expand_path('/path/to/abs_profile'))
The default value will be used LANG
environment variable.
Will be changed as listed below:
it must throw the Firebrew::NetworkError
exception. Also, it must display the message of this exception, and return the corresponding value for it.
The base_dir
value:
Wrong: ~/AppData/Roming/Mozilla/Firefox
Right: ~/AppData/Roaming/Mozilla/Firefox
The error messages in the issue #10:
2) Firebrew::Runner Instance #install(params) should not raise Exception
Failure/Error: it { expect{subject}.to_not raise_error }
expected no Exception, got #<Firebrew::FirefoxCommandError: Firebrew::FirefoxCommandError> with backtrace:
# ./lib/firebrew/firefox/command.rb:17:in `rescue in initialize'
# ./lib/firebrew/firefox/command.rb:12:in `initialize'
# ./lib/firebrew/runner.rb:42:in `new'
# ./lib/firebrew/runner.rb:42:in `initialize'
# ./spec/firebrew/runner_spec.rb:135:in `new'
# ./spec/firebrew/runner_spec.rb:135:in `block (3 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:160:in `block (4 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:164:in `block (5 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:164:in `block (4 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:164:in `block (4 levels) in <module:Firebrew>'
3) Firebrew::Runner Instance #install(params) when the `params[:term]` existed should raise Firebrew::OperationAlreadyCompletedError
Failure/Error: it { expect{subject}.to raise_error(Firebrew::OperationAlreadyCompletedError) }
expected Firebrew::OperationAlreadyCompletedError, got #<Firebrew::FirefoxCommandError: Firebrew::FirefoxCommandError> with backtrace:
# ./lib/firebrew/firefox/command.rb:17:in `rescue in initialize'
# ./lib/firebrew/firefox/command.rb:12:in `initialize'
# ./lib/firebrew/runner.rb:42:in `new'
# ./lib/firebrew/runner.rb:42:in `initialize'
# ./spec/firebrew/runner_spec.rb:135:in `new'
# ./spec/firebrew/runner_spec.rb:135:in `block (3 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:169:in `block (5 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:173:in `block (6 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:173:in `block (5 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:173:in `block (5 levels) in <module:Firebrew>'
4) Firebrew::Runner Instance #uninstall(params) should not raise Exception
Failure/Error: it { expect{subject}.to_not raise_error }
expected no Exception, got #<Firebrew::FirefoxCommandError: Firebrew::FirefoxCommandError> with backtrace:
# ./lib/firebrew/firefox/command.rb:17:in `rescue in initialize'
# ./lib/firebrew/firefox/command.rb:12:in `initialize'
# ./lib/firebrew/runner.rb:42:in `new'
# ./lib/firebrew/runner.rb:42:in `initialize'
# ./spec/firebrew/runner_spec.rb:135:in `new'
# ./spec/firebrew/runner_spec.rb:135:in `block (3 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:180:in `block (4 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:184:in `block (5 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:184:in `block (4 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:184:in `block (4 levels) in <module:Firebrew>'
5) Firebrew::Runner Instance #uninstall(params) when the `params[:term]` not existed should raise Firebrew::OperationAlreadyCompletedError
Failure/Error: it { expect{subject}.to raise_error(Firebrew::OperationAlreadyCompletedError) }
expected Firebrew::OperationAlreadyCompletedError, got #<Firebrew::FirefoxCommandError: Firebrew::FirefoxCommandError> with backtrace:
# ./lib/firebrew/firefox/command.rb:17:in `rescue in initialize'
# ./lib/firebrew/firefox/command.rb:12:in `initialize'
# ./lib/firebrew/runner.rb:42:in `new'
# ./lib/firebrew/runner.rb:42:in `initialize'
# ./spec/firebrew/runner_spec.rb:135:in `new'
# ./spec/firebrew/runner_spec.rb:135:in `block (3 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:190:in `block (5 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:194:in `block (6 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:194:in `block (5 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:194:in `block (5 levels) in <module:Firebrew>'
The reason it occurs the above errors is that the Firefox command path contains spaces. Therefore, will wrap that by double quotations shown below:
before:
result = @executer.exec('%{firefox} --version' % @config)
after:
result = @executer.exec('"%{firefox}" --version' % @config)
If in order to resolve this issue, the em:unpack
value of the install manifests was true, it shall denominate to the value of GUID after unzip the XPI package.
Hello,
I'm trying to use firebrew on Debian Jessie, which is shipped with Iceweasel. I thought that firebrew would work since Iceweasel seems to be a modified Firefox however it doesn't work. The error is:
# Error
[afu:~]$ firebrew info
(process:25628): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Command is not Firefox: /usr/bin/firefox
# Trying with the profile
[afu:~]$ firebrew -d ~/.mozilla/firefox info
(process:25923): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Command is not Firefox: /usr/bin/firefox
# Trying especifying the binary
[afu:~]$ firebrew -f /usr/bin/firefox info
(process:25951): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Command is not Firefox: /usr/bin/firefox
# Trying especifying the iceweasel binary
[afu:~]$ firebrew -f /usr/bin/iceweasel info
(process:26087): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Command is not Firefox: /usr/bin/iceweasel
# Firefox alias available at /usr/bin/firefox
[afu:~]$ which firefox
/usr/bin/firefox
Any idea?
Thank you very much.
Throw the Firebrew::OperationAlreadyCompletedError
as shown below:
$ firebrew install installed-extension
...(Firebrew::OperationAlreadyCompletedError)
from: path/to/error
...
The error messages:
#<OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed>
The profile information which are got are listed below.:
The gem is a simple platform selector.
Site: rdp/os
The error messages are shown below:
1) Firebrew::Firefox::Profile Manager #all() should construct records
Failure/Error: expect(subject[2].path).to eq('/path/to/abs_profile')
expected: "/path/to/abs_profile"
got: "Z:/path/to/abs_profile"
(compared using ==)
# ./spec/firebrew/firefox/profile_spec.rb:36:in `block (4 levels) in <module:Firefox>'
2) Firebrew::Runner Instance #install(params) should not raise Exception
Failure/Error: it { expect{subject}.to_not raise_error }
expected no Exception, got #<Firebrew::FirefoxCommandError: Firebrew::FirefoxCommandError> with backtrace:
# ./lib/firebrew/firefox/command.rb:17:in `rescue in initialize'
# ./lib/firebrew/firefox/command.rb:12:in `initialize'
# ./lib/firebrew/runner.rb:42:in `new'
# ./lib/firebrew/runner.rb:42:in `initialize'
# ./spec/firebrew/runner_spec.rb:135:in `new'
# ./spec/firebrew/runner_spec.rb:135:in `block (3 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:160:in `block (4 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:164:in `block (5 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:164:in `block (4 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:164:in `block (4 levels) in <module:Firebrew>'
3) Firebrew::Runner Instance #install(params) when the `params[:term]` existed should raise Firebrew::OperationAlreadyCompletedError
Failure/Error: it { expect{subject}.to raise_error(Firebrew::OperationAlreadyCompletedError) }
expected Firebrew::OperationAlreadyCompletedError, got #<Firebrew::FirefoxCommandError: Firebrew::FirefoxCommandError> with backtrace:
# ./lib/firebrew/firefox/command.rb:17:in `rescue in initialize'
# ./lib/firebrew/firefox/command.rb:12:in `initialize'
# ./lib/firebrew/runner.rb:42:in `new'
# ./lib/firebrew/runner.rb:42:in `initialize'
# ./spec/firebrew/runner_spec.rb:135:in `new'
# ./spec/firebrew/runner_spec.rb:135:in `block (3 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:169:in `block (5 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:173:in `block (6 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:173:in `block (5 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:173:in `block (5 levels) in <module:Firebrew>'
4) Firebrew::Runner Instance #uninstall(params) should not raise Exception
Failure/Error: it { expect{subject}.to_not raise_error }
expected no Exception, got #<Firebrew::FirefoxCommandError: Firebrew::FirefoxCommandError> with backtrace:
# ./lib/firebrew/firefox/command.rb:17:in `rescue in initialize'
# ./lib/firebrew/firefox/command.rb:12:in `initialize'
# ./lib/firebrew/runner.rb:42:in `new'
# ./lib/firebrew/runner.rb:42:in `initialize'
# ./spec/firebrew/runner_spec.rb:135:in `new'
# ./spec/firebrew/runner_spec.rb:135:in `block (3 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:180:in `block (4 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:184:in `block (5 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:184:in `block (4 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:184:in `block (4 levels) in <module:Firebrew>'
5) Firebrew::Runner Instance #uninstall(params) when the `params[:term]` not existed should raise Firebrew::OperationAlreadyCompletedError
Failure/Error: it { expect{subject}.to raise_error(Firebrew::OperationAlreadyCompletedError) }
expected Firebrew::OperationAlreadyCompletedError, got #<Firebrew::FirefoxCommandError: Firebrew::FirefoxCommandError> with backtrace:
# ./lib/firebrew/firefox/command.rb:17:in `rescue in initialize'
# ./lib/firebrew/firefox/command.rb:12:in `initialize'
# ./lib/firebrew/runner.rb:42:in `new'
# ./lib/firebrew/runner.rb:42:in `initialize'
# ./spec/firebrew/runner_spec.rb:135:in `new'
# ./spec/firebrew/runner_spec.rb:135:in `block (3 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:190:in `block (5 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:194:in `block (6 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:194:in `block (5 levels) in <module:Firebrew>'
# ./spec/firebrew/runner_spec.rb:194:in `block (5 levels) in <module:Firebrew>'
Finished in 6.07 seconds (files took 18.39 seconds to load)
72 examples, 5 failures
Failed examples:
rspec ./spec/firebrew/firefox/profile_spec.rb:26 # Firebrew::Firefox::Profile Manager #all() should construct records
rspec ./spec/firebrew/runner_spec.rb:164 # Firebrew::Runner Instance #install(params) should not raise Exception
rspec ./spec/firebrew/runner_spec.rb:173 # Firebrew::Runner Instance #install(params) when the `params[:term]` existed should raise Firebrew::OperationAlreadyCompletedError
rspec ./spec/firebrew/runner_spec.rb:184 # Firebrew::Runner Instance #uninstall(params) should not raise Exception
rspec ./spec/firebrew/runner_spec.rb:194 # Firebrew::Runner Instance #uninstall(params) when the `params[:term]` not existed should raise Firebrew::OperationAlreadyCompletedError
The currently help message is inadequacy, so it change as shown below:
$ firebrew --help
Usage: firebrew [options] command
commands:
install:
firebrew install extension-name
uninstall:
firebrew uninstall extension-name
info:
firebrew info extension-name
search:
firebrew search term
list:
firebrew list
options:
-d, --base-dir=path Firefox profiles.ini directory
-p, --profile=name Firefox profile name
-f, --firefox=path Firefox command path
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.