megar 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +19 -0
- data/.rspec +1 -0
- data/.rvmrc +1 -0
- data/.travis.yml +11 -0
- data/CHANGELOG +5 -0
- data/Gemfile +4 -0
- data/Guardfile +11 -0
- data/LICENSE +22 -0
- data/README.rdoc +218 -0
- data/Rakefile +33 -0
- data/bin/megar +16 -0
- data/lib/extensions/math.rb +13 -0
- data/lib/js_ref_impl/_README +9 -0
- data/lib/js_ref_impl/base64_1.js +83 -0
- data/lib/js_ref_impl/crypto_5.js +1795 -0
- data/lib/js_ref_impl/download_8.js +867 -0
- data/lib/js_ref_impl/hex_1.js +76 -0
- data/lib/js_ref_impl/index_9.js +666 -0
- data/lib/js_ref_impl/js.manifest +115 -0
- data/lib/js_ref_impl/rsa_1.js +456 -0
- data/lib/js_ref_impl/sjcl_1.js +1 -0
- data/lib/js_ref_impl/upload_10.js +691 -0
- data/lib/megar.rb +11 -0
- data/lib/megar/catalog.rb +5 -0
- data/lib/megar/catalog/catalog_item.rb +90 -0
- data/lib/megar/catalog/file.rb +14 -0
- data/lib/megar/catalog/files.rb +13 -0
- data/lib/megar/catalog/folder.rb +20 -0
- data/lib/megar/catalog/folders.rb +28 -0
- data/lib/megar/connection.rb +84 -0
- data/lib/megar/crypto.rb +399 -0
- data/lib/megar/exception.rb +55 -0
- data/lib/megar/session.rb +157 -0
- data/lib/megar/shell.rb +87 -0
- data/lib/megar/version.rb +3 -0
- data/megar.gemspec +30 -0
- data/spec/fixtures/crypto_expectations/sample_user.json +109 -0
- data/spec/spec_helper.rb +24 -0
- data/spec/support/crypto_expectations_helper.rb +44 -0
- data/spec/support/mocks_helper.rb +22 -0
- data/spec/unit/catalog/file_spec.rb +31 -0
- data/spec/unit/catalog/files_spec.rb +26 -0
- data/spec/unit/catalog/folder_spec.rb +28 -0
- data/spec/unit/catalog/folders_spec.rb +49 -0
- data/spec/unit/connection_spec.rb +50 -0
- data/spec/unit/crypto_spec.rb +476 -0
- data/spec/unit/exception_spec.rb +35 -0
- data/spec/unit/extensions/math_spec.rb +21 -0
- data/spec/unit/session_spec.rb +146 -0
- data/spec/unit/shell_spec.rb +18 -0
- metadata +238 -0
| @@ -0,0 +1,35 @@ | |
| 1 | 
            +
            require 'spec_helper'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe "Megar Exceptions" do
         | 
| 4 | 
            +
             | 
| 5 | 
            +
              describe "Megar::Error" do
         | 
| 6 | 
            +
                let(:exception_class) { Megar::Error }
         | 
| 7 | 
            +
                subject { raise exception_class.new("test") }
         | 
| 8 | 
            +
                it "should raise correctly" do
         | 
| 9 | 
            +
                  expect { subject }.to raise_error(exception_class)
         | 
| 10 | 
            +
                end
         | 
| 11 | 
            +
              end
         | 
| 12 | 
            +
             | 
| 13 | 
            +
              describe "Megar::MegaRequestError" do
         | 
| 14 | 
            +
                let(:exception_class) { Megar::MegaRequestError }
         | 
| 15 | 
            +
                {
         | 
| 16 | 
            +
                  -15 => 'ESID',
         | 
| 17 | 
            +
                  -6 => 'ETOOMANY',
         | 
| 18 | 
            +
                  -99 => 'UNDEFINED'
         | 
| 19 | 
            +
                }.each do |error_code,message_partial|
         | 
| 20 | 
            +
                  describe "error #{error_code}" do
         | 
| 21 | 
            +
                    let(:exception_instance) { exception_class.new(error_code) }
         | 
| 22 | 
            +
                    subject { raise exception_instance }
         | 
| 23 | 
            +
                    it "should raise correctly" do
         | 
| 24 | 
            +
                      expect { raise subject }.to raise_error(exception_class)
         | 
| 25 | 
            +
                    end
         | 
| 26 | 
            +
                    describe "#message" do
         | 
| 27 | 
            +
                      subject { exception_instance.message }
         | 
| 28 | 
            +
                      it { should include(message_partial) }
         | 
| 29 | 
            +
                    end
         | 
| 30 | 
            +
                  end
         | 
| 31 | 
            +
                end
         | 
| 32 | 
            +
             | 
| 33 | 
            +
              end
         | 
| 34 | 
            +
             | 
| 35 | 
            +
            end
         | 
| @@ -0,0 +1,21 @@ | |
| 1 | 
            +
            require 'spec_helper'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe "Math.powm" do
         | 
| 4 | 
            +
             | 
| 5 | 
            +
              subject { Math.powm(b, p, m) }
         | 
| 6 | 
            +
             | 
| 7 | 
            +
              context "when small numbers" do
         | 
| 8 | 
            +
                let(:b) { 3 }
         | 
| 9 | 
            +
                let(:p) { 2 }
         | 
| 10 | 
            +
                let(:m) { 2 }
         | 
| 11 | 
            +
                it { should eql(1) }
         | 
| 12 | 
            +
              end
         | 
| 13 | 
            +
             | 
| 14 | 
            +
              context "when mega numbers" do
         | 
| 15 | 
            +
                let(:b) { 12983373611079770211598532059277454574873142790933720755590694119490820724884320773416062882872824441407372114886530726474979688565347545388995368928786174580865050206056588702714047747117203947610116835797727211967502240199908615095083794940126702458539176340055473274185983336006544169353743065050853660077890672872837121852471639967733140753846470653509594838648433786451039871566965471109413962221372977032372323023277197880477708795783672178465649341215154594913545491105371339761229791332444362145738176132020340880433834911670388940905488618362858862479443215147800580019791462743546344709458220309095035153113 }
         | 
| 16 | 
            +
                let(:p) { 145152480967442902710798365717824992407539346469007950427947366246418381110497813913858957184058405066632963688414200899762074556635208659933679812460151505046070928204691401275085086735464744077411206367875411771694473049724208018450885347494899144266437372521383994850220996849268745979417013187349849634843 }
         | 
| 17 | 
            +
                let(:m) { 142281187671710416869275196755125318539473540637032484403888464391289938418112669687981856743914459731863778035997945316748255907504882215849378865708087640335269803246793543314284773670481750851308061490898252628799994463123391676396043625029999665330718877331066039172562710647546041034169018526295459116796 }
         | 
| 18 | 
            +
                it { should eql(129028932005782897949279696471325767689863886085968295661273887017485942014684847994821939446802702313479280634487930434066911827155895340444010316539793570826688827771870190726606362290595576791790500802375897358738534808944235383146154267477154590358447966848765704651511264321191969959365555458361318699345) }
         | 
| 19 | 
            +
              end
         | 
| 20 | 
            +
             | 
| 21 | 
            +
            end
         | 
| @@ -0,0 +1,146 @@ | |
| 1 | 
            +
            require 'spec_helper'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe Megar::Session do
         | 
| 4 | 
            +
              let(:test_data) { crypto_expectations('sample_user') }
         | 
| 5 | 
            +
             | 
| 6 | 
            +
              let(:email) { test_data['email'] }
         | 
| 7 | 
            +
              let(:password) { test_data['password'] }
         | 
| 8 | 
            +
             | 
| 9 | 
            +
              let(:login_response_data) { test_data['login_response_data'] }
         | 
| 10 | 
            +
             | 
| 11 | 
            +
              let(:expected_uh) { test_data['expected_uh'] }
         | 
| 12 | 
            +
              let(:expected_master_key) { test_data['master_key'] }
         | 
| 13 | 
            +
              let(:expected_sid) { test_data['sid'] }
         | 
| 14 | 
            +
              let(:expected_rsa_private_key_b64) { test_data['rsa_private_key_b64'] }
         | 
| 15 | 
            +
              let(:expected_decomposed_rsa_private_key) { test_data['decomposed_rsa_private_key'] }
         | 
| 16 | 
            +
             | 
| 17 | 
            +
             | 
| 18 | 
            +
              context "with username and password" do
         | 
| 19 | 
            +
                let(:session) { Megar::Session.new(options) }
         | 
| 20 | 
            +
                let(:base_options) { { 'email' => email, 'password' => password, 'autoconnect' => false } }
         | 
| 21 | 
            +
                let(:options) { base_options }
         | 
| 22 | 
            +
             | 
| 23 | 
            +
                describe "#connected?" do
         | 
| 24 | 
            +
                  subject { session.connected? }
         | 
| 25 | 
            +
                  context "when before login" do
         | 
| 26 | 
            +
                    it { should be_false }
         | 
| 27 | 
            +
                  end
         | 
| 28 | 
            +
                  context "when after login" do
         | 
| 29 | 
            +
                    before { session.sid = "something" }
         | 
| 30 | 
            +
                    it { should be_true }
         | 
| 31 | 
            +
                  end
         | 
| 32 | 
            +
                end
         | 
| 33 | 
            +
             | 
| 34 | 
            +
                describe "#to_s" do
         | 
| 35 | 
            +
                  subject { session.to_s }
         | 
| 36 | 
            +
                  context "when not connected" do
         | 
| 37 | 
            +
                    it { should eql("Megar::Session: not connected") }
         | 
| 38 | 
            +
                  end
         | 
| 39 | 
            +
                  context "when connected" do
         | 
| 40 | 
            +
                    before { session.stub(:connected?).and_return(true) }
         | 
| 41 | 
            +
                    it { should eql("Megar::Session: connected as #{email}") }
         | 
| 42 | 
            +
                  end
         | 
| 43 | 
            +
                end
         | 
| 44 | 
            +
             | 
| 45 | 
            +
                describe "#email" do
         | 
| 46 | 
            +
                  subject { session.email }
         | 
| 47 | 
            +
                  it { should eql(email) }
         | 
| 48 | 
            +
                end
         | 
| 49 | 
            +
             | 
| 50 | 
            +
                describe "#password" do
         | 
| 51 | 
            +
                  subject { session.password }
         | 
| 52 | 
            +
                  it { should eql(password) }
         | 
| 53 | 
            +
                end
         | 
| 54 | 
            +
             | 
| 55 | 
            +
                context "when api_endpoint override provided" do
         | 
| 56 | 
            +
                  let(:alternative_endpoint) { 'http://bogative.one' }
         | 
| 57 | 
            +
                  let(:options) { base_options.merge({ api_endpoint: alternative_endpoint }) }
         | 
| 58 | 
            +
                  subject { session.api_endpoint }
         | 
| 59 | 
            +
                  it { should eql(alternative_endpoint) }
         | 
| 60 | 
            +
                end
         | 
| 61 | 
            +
             | 
| 62 | 
            +
                describe "#uh (protected)" do
         | 
| 63 | 
            +
                  #
         | 
| 64 | 
            +
                  # expectation generation in Javascript:
         | 
| 65 | 
            +
                  #   aes = new sjcl.cipher.aes(prepare_key_pw(password))
         | 
| 66 | 
            +
                  #   stringhash(email.toLowerCase(), aes)
         | 
| 67 | 
            +
                  #   => EGQjdVjoWPA
         | 
| 68 | 
            +
                  subject { session.send(:uh) }
         | 
| 69 | 
            +
                  it { should eql(expected_uh) }
         | 
| 70 | 
            +
                  context "when mixed-case email" do
         | 
| 71 | 
            +
                    let(:email) { test_data['email_mixed_case'] }
         | 
| 72 | 
            +
                    it { should eql(expected_uh) }
         | 
| 73 | 
            +
                  end
         | 
| 74 | 
            +
                end
         | 
| 75 | 
            +
             | 
| 76 | 
            +
                describe "#connect!" do
         | 
| 77 | 
            +
                  let(:connect) { session.connect! }
         | 
| 78 | 
            +
                  let(:expected_params) { {'a' => 'us', 'user' => email, 'uh' => expected_uh} }
         | 
| 79 | 
            +
                  it "should invoke the expected api request" do
         | 
| 80 | 
            +
                    session.should_receive(:api_request).with(expected_params).and_return({})
         | 
| 81 | 
            +
                    connect
         | 
| 82 | 
            +
                  end
         | 
| 83 | 
            +
                  context "after login completed" do
         | 
| 84 | 
            +
                    before do
         | 
| 85 | 
            +
                      session.stub(:api_request).and_return(login_response_data)
         | 
| 86 | 
            +
                      connect
         | 
| 87 | 
            +
                    end
         | 
| 88 | 
            +
                    subject { session }
         | 
| 89 | 
            +
             | 
| 90 | 
            +
                    its(:master_key) { should eql(expected_master_key) }
         | 
| 91 | 
            +
                    its(:sid) { should eql(expected_sid) }
         | 
| 92 | 
            +
                    its(:rsa_private_key_b64) { should eql(expected_rsa_private_key_b64) }
         | 
| 93 | 
            +
                    its(:decomposed_rsa_private_key) { should eql(expected_decomposed_rsa_private_key) }
         | 
| 94 | 
            +
                  end
         | 
| 95 | 
            +
                end
         | 
| 96 | 
            +
             | 
| 97 | 
            +
                describe "#handle_login_challenge_response (protected)" do
         | 
| 98 | 
            +
                  before { session.send(:handle_login_challenge_response,login_response_data) }
         | 
| 99 | 
            +
                  subject { session }
         | 
| 100 | 
            +
             | 
| 101 | 
            +
                  its(:master_key) { should eql(expected_master_key) }
         | 
| 102 | 
            +
                  its(:sid) { should eql(expected_sid) }
         | 
| 103 | 
            +
                  its(:rsa_private_key_b64) { should eql(expected_rsa_private_key_b64) }
         | 
| 104 | 
            +
                  its(:decomposed_rsa_private_key) { should eql(expected_decomposed_rsa_private_key) }
         | 
| 105 | 
            +
                end
         | 
| 106 | 
            +
             | 
| 107 | 
            +
                describe "#folders" do
         | 
| 108 | 
            +
                  context "when not initialised" do
         | 
| 109 | 
            +
                    it "should refresh_files!" do
         | 
| 110 | 
            +
                      session.should_receive(:refresh_files!)
         | 
| 111 | 
            +
                      session.folders
         | 
| 112 | 
            +
                    end
         | 
| 113 | 
            +
                  end
         | 
| 114 | 
            +
                end
         | 
| 115 | 
            +
             | 
| 116 | 
            +
                describe "#files" do
         | 
| 117 | 
            +
                  context "when not initialised" do
         | 
| 118 | 
            +
                    it "should refresh_files!" do
         | 
| 119 | 
            +
                      session.should_receive(:refresh_files!)
         | 
| 120 | 
            +
                      session.files
         | 
| 121 | 
            +
                    end
         | 
| 122 | 
            +
                  end
         | 
| 123 | 
            +
                end
         | 
| 124 | 
            +
             | 
| 125 | 
            +
                describe "#refresh_files!" do
         | 
| 126 | 
            +
                  let(:session) { connected_session_with_mocked_api_responses(options) }
         | 
| 127 | 
            +
                  before do
         | 
| 128 | 
            +
                    session.refresh_files!
         | 
| 129 | 
            +
                  end
         | 
| 130 | 
            +
                  describe "#folders" do
         | 
| 131 | 
            +
                    subject { session.folders }
         | 
| 132 | 
            +
                    it { should be_a(Megar::Folders) }
         | 
| 133 | 
            +
                    its(:collection) { should_not be_empty }
         | 
| 134 | 
            +
                  end
         | 
| 135 | 
            +
                  describe "#files" do
         | 
| 136 | 
            +
                    subject { session.files }
         | 
| 137 | 
            +
                    it { should be_a(Megar::Files) }
         | 
| 138 | 
            +
                    its(:collection) { should_not be_empty }
         | 
| 139 | 
            +
                  end
         | 
| 140 | 
            +
                end
         | 
| 141 | 
            +
             | 
| 142 | 
            +
              end
         | 
| 143 | 
            +
             | 
| 144 | 
            +
            end
         | 
| 145 | 
            +
             | 
| 146 | 
            +
             | 
| @@ -0,0 +1,18 @@ | |
| 1 | 
            +
            require 'spec_helper'
         | 
| 2 | 
            +
            require 'getoptions'
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            describe Megar::Shell do
         | 
| 5 | 
            +
             | 
| 6 | 
            +
              let(:getoptions) { GetOptions.new(Megar::Shell::OPTIONS, options) }
         | 
| 7 | 
            +
              let(:shell) { Megar::Shell.new(getoptions,argv) }
         | 
| 8 | 
            +
             | 
| 9 | 
            +
              describe "#usage" do
         | 
| 10 | 
            +
                let(:options) { ['-h'] }
         | 
| 11 | 
            +
                let(:argv) { [] }
         | 
| 12 | 
            +
                it "should print usage when run" do
         | 
| 13 | 
            +
                  shell.should_receive(:usage)
         | 
| 14 | 
            +
                  shell.run
         | 
| 15 | 
            +
                end
         | 
| 16 | 
            +
              end
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            end
         | 
    
        metadata
    ADDED
    
    | @@ -0,0 +1,238 @@ | |
| 1 | 
            +
            --- !ruby/object:Gem::Specification
         | 
| 2 | 
            +
            name: megar
         | 
| 3 | 
            +
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            +
              version: 0.0.1
         | 
| 5 | 
            +
              prerelease: 
         | 
| 6 | 
            +
            platform: ruby
         | 
| 7 | 
            +
            authors:
         | 
| 8 | 
            +
            - Paul Gallagher
         | 
| 9 | 
            +
            autorequire: 
         | 
| 10 | 
            +
            bindir: bin
         | 
| 11 | 
            +
            cert_chain: []
         | 
| 12 | 
            +
            date: 2013-02-25 00:00:00.000000000 Z
         | 
| 13 | 
            +
            dependencies:
         | 
| 14 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 15 | 
            +
              name: getoptions
         | 
| 16 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 17 | 
            +
                none: false
         | 
| 18 | 
            +
                requirements:
         | 
| 19 | 
            +
                - - ! '>='
         | 
| 20 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 21 | 
            +
                    version: '0.3'
         | 
| 22 | 
            +
              type: :runtime
         | 
| 23 | 
            +
              prerelease: false
         | 
| 24 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 25 | 
            +
                none: false
         | 
| 26 | 
            +
                requirements:
         | 
| 27 | 
            +
                - - ! '>='
         | 
| 28 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 29 | 
            +
                    version: '0.3'
         | 
| 30 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 31 | 
            +
              name: activesupport
         | 
| 32 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 33 | 
            +
                none: false
         | 
| 34 | 
            +
                requirements:
         | 
| 35 | 
            +
                - - ! '>='
         | 
| 36 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 37 | 
            +
                    version: 3.0.3
         | 
| 38 | 
            +
              type: :runtime
         | 
| 39 | 
            +
              prerelease: false
         | 
| 40 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 41 | 
            +
                none: false
         | 
| 42 | 
            +
                requirements:
         | 
| 43 | 
            +
                - - ! '>='
         | 
| 44 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 45 | 
            +
                    version: 3.0.3
         | 
| 46 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 47 | 
            +
              name: bundler
         | 
| 48 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 49 | 
            +
                none: false
         | 
| 50 | 
            +
                requirements:
         | 
| 51 | 
            +
                - - ! '>'
         | 
| 52 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 53 | 
            +
                    version: 1.1.0
         | 
| 54 | 
            +
              type: :development
         | 
| 55 | 
            +
              prerelease: false
         | 
| 56 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 57 | 
            +
                none: false
         | 
| 58 | 
            +
                requirements:
         | 
| 59 | 
            +
                - - ! '>'
         | 
| 60 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 61 | 
            +
                    version: 1.1.0
         | 
| 62 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 63 | 
            +
              name: rake
         | 
| 64 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 65 | 
            +
                none: false
         | 
| 66 | 
            +
                requirements:
         | 
| 67 | 
            +
                - - ~>
         | 
| 68 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 69 | 
            +
                    version: 0.9.2.2
         | 
| 70 | 
            +
              type: :development
         | 
| 71 | 
            +
              prerelease: false
         | 
| 72 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 73 | 
            +
                none: false
         | 
| 74 | 
            +
                requirements:
         | 
| 75 | 
            +
                - - ~>
         | 
| 76 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 77 | 
            +
                    version: 0.9.2.2
         | 
| 78 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 79 | 
            +
              name: rspec
         | 
| 80 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 81 | 
            +
                none: false
         | 
| 82 | 
            +
                requirements:
         | 
| 83 | 
            +
                - - ~>
         | 
| 84 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 85 | 
            +
                    version: 2.8.0
         | 
| 86 | 
            +
              type: :development
         | 
| 87 | 
            +
              prerelease: false
         | 
| 88 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 89 | 
            +
                none: false
         | 
| 90 | 
            +
                requirements:
         | 
| 91 | 
            +
                - - ~>
         | 
| 92 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 93 | 
            +
                    version: 2.8.0
         | 
| 94 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 95 | 
            +
              name: rdoc
         | 
| 96 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 97 | 
            +
                none: false
         | 
| 98 | 
            +
                requirements:
         | 
| 99 | 
            +
                - - ~>
         | 
| 100 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 101 | 
            +
                    version: '3.11'
         | 
| 102 | 
            +
              type: :development
         | 
| 103 | 
            +
              prerelease: false
         | 
| 104 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 105 | 
            +
                none: false
         | 
| 106 | 
            +
                requirements:
         | 
| 107 | 
            +
                - - ~>
         | 
| 108 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 109 | 
            +
                    version: '3.11'
         | 
| 110 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 111 | 
            +
              name: guard-rspec
         | 
| 112 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 113 | 
            +
                none: false
         | 
| 114 | 
            +
                requirements:
         | 
| 115 | 
            +
                - - ~>
         | 
| 116 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 117 | 
            +
                    version: 1.2.0
         | 
| 118 | 
            +
              type: :development
         | 
| 119 | 
            +
              prerelease: false
         | 
| 120 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 121 | 
            +
                none: false
         | 
| 122 | 
            +
                requirements:
         | 
| 123 | 
            +
                - - ~>
         | 
| 124 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 125 | 
            +
                    version: 1.2.0
         | 
| 126 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 127 | 
            +
              name: rb-fsevent
         | 
| 128 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 129 | 
            +
                none: false
         | 
| 130 | 
            +
                requirements:
         | 
| 131 | 
            +
                - - ~>
         | 
| 132 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 133 | 
            +
                    version: 0.9.1
         | 
| 134 | 
            +
              type: :development
         | 
| 135 | 
            +
              prerelease: false
         | 
| 136 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 137 | 
            +
                none: false
         | 
| 138 | 
            +
                requirements:
         | 
| 139 | 
            +
                - - ~>
         | 
| 140 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 141 | 
            +
                    version: 0.9.1
         | 
| 142 | 
            +
            description: Megaargh! A Ruby wrapper for the Mega API (mega.co.nz)
         | 
| 143 | 
            +
            email:
         | 
| 144 | 
            +
            - gallagher.paul@gmail.com
         | 
| 145 | 
            +
            executables:
         | 
| 146 | 
            +
            - megar
         | 
| 147 | 
            +
            extensions: []
         | 
| 148 | 
            +
            extra_rdoc_files: []
         | 
| 149 | 
            +
            files:
         | 
| 150 | 
            +
            - .gitignore
         | 
| 151 | 
            +
            - .rspec
         | 
| 152 | 
            +
            - .rvmrc
         | 
| 153 | 
            +
            - .travis.yml
         | 
| 154 | 
            +
            - CHANGELOG
         | 
| 155 | 
            +
            - Gemfile
         | 
| 156 | 
            +
            - Guardfile
         | 
| 157 | 
            +
            - LICENSE
         | 
| 158 | 
            +
            - README.rdoc
         | 
| 159 | 
            +
            - Rakefile
         | 
| 160 | 
            +
            - bin/megar
         | 
| 161 | 
            +
            - lib/extensions/math.rb
         | 
| 162 | 
            +
            - lib/js_ref_impl/_README
         | 
| 163 | 
            +
            - lib/js_ref_impl/base64_1.js
         | 
| 164 | 
            +
            - lib/js_ref_impl/crypto_5.js
         | 
| 165 | 
            +
            - lib/js_ref_impl/download_8.js
         | 
| 166 | 
            +
            - lib/js_ref_impl/hex_1.js
         | 
| 167 | 
            +
            - lib/js_ref_impl/index_9.js
         | 
| 168 | 
            +
            - lib/js_ref_impl/js.manifest
         | 
| 169 | 
            +
            - lib/js_ref_impl/rsa_1.js
         | 
| 170 | 
            +
            - lib/js_ref_impl/sjcl_1.js
         | 
| 171 | 
            +
            - lib/js_ref_impl/upload_10.js
         | 
| 172 | 
            +
            - lib/megar.rb
         | 
| 173 | 
            +
            - lib/megar/catalog.rb
         | 
| 174 | 
            +
            - lib/megar/catalog/catalog_item.rb
         | 
| 175 | 
            +
            - lib/megar/catalog/file.rb
         | 
| 176 | 
            +
            - lib/megar/catalog/files.rb
         | 
| 177 | 
            +
            - lib/megar/catalog/folder.rb
         | 
| 178 | 
            +
            - lib/megar/catalog/folders.rb
         | 
| 179 | 
            +
            - lib/megar/connection.rb
         | 
| 180 | 
            +
            - lib/megar/crypto.rb
         | 
| 181 | 
            +
            - lib/megar/exception.rb
         | 
| 182 | 
            +
            - lib/megar/session.rb
         | 
| 183 | 
            +
            - lib/megar/shell.rb
         | 
| 184 | 
            +
            - lib/megar/version.rb
         | 
| 185 | 
            +
            - megar.gemspec
         | 
| 186 | 
            +
            - spec/fixtures/crypto_expectations/sample_user.json
         | 
| 187 | 
            +
            - spec/spec_helper.rb
         | 
| 188 | 
            +
            - spec/support/crypto_expectations_helper.rb
         | 
| 189 | 
            +
            - spec/support/mocks_helper.rb
         | 
| 190 | 
            +
            - spec/unit/catalog/file_spec.rb
         | 
| 191 | 
            +
            - spec/unit/catalog/files_spec.rb
         | 
| 192 | 
            +
            - spec/unit/catalog/folder_spec.rb
         | 
| 193 | 
            +
            - spec/unit/catalog/folders_spec.rb
         | 
| 194 | 
            +
            - spec/unit/connection_spec.rb
         | 
| 195 | 
            +
            - spec/unit/crypto_spec.rb
         | 
| 196 | 
            +
            - spec/unit/exception_spec.rb
         | 
| 197 | 
            +
            - spec/unit/extensions/math_spec.rb
         | 
| 198 | 
            +
            - spec/unit/session_spec.rb
         | 
| 199 | 
            +
            - spec/unit/shell_spec.rb
         | 
| 200 | 
            +
            homepage: https://github.com/tardate/megar
         | 
| 201 | 
            +
            licenses: []
         | 
| 202 | 
            +
            post_install_message: 
         | 
| 203 | 
            +
            rdoc_options: []
         | 
| 204 | 
            +
            require_paths:
         | 
| 205 | 
            +
            - lib
         | 
| 206 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 207 | 
            +
              none: false
         | 
| 208 | 
            +
              requirements:
         | 
| 209 | 
            +
              - - ! '>='
         | 
| 210 | 
            +
                - !ruby/object:Gem::Version
         | 
| 211 | 
            +
                  version: '0'
         | 
| 212 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 213 | 
            +
              none: false
         | 
| 214 | 
            +
              requirements:
         | 
| 215 | 
            +
              - - ! '>='
         | 
| 216 | 
            +
                - !ruby/object:Gem::Version
         | 
| 217 | 
            +
                  version: '0'
         | 
| 218 | 
            +
            requirements: []
         | 
| 219 | 
            +
            rubyforge_project: 
         | 
| 220 | 
            +
            rubygems_version: 1.8.24
         | 
| 221 | 
            +
            signing_key: 
         | 
| 222 | 
            +
            specification_version: 3
         | 
| 223 | 
            +
            summary: A Ruby wrapper and command-line tool for the Mega API (mega.co.nz)
         | 
| 224 | 
            +
            test_files:
         | 
| 225 | 
            +
            - spec/fixtures/crypto_expectations/sample_user.json
         | 
| 226 | 
            +
            - spec/spec_helper.rb
         | 
| 227 | 
            +
            - spec/support/crypto_expectations_helper.rb
         | 
| 228 | 
            +
            - spec/support/mocks_helper.rb
         | 
| 229 | 
            +
            - spec/unit/catalog/file_spec.rb
         | 
| 230 | 
            +
            - spec/unit/catalog/files_spec.rb
         | 
| 231 | 
            +
            - spec/unit/catalog/folder_spec.rb
         | 
| 232 | 
            +
            - spec/unit/catalog/folders_spec.rb
         | 
| 233 | 
            +
            - spec/unit/connection_spec.rb
         | 
| 234 | 
            +
            - spec/unit/crypto_spec.rb
         | 
| 235 | 
            +
            - spec/unit/exception_spec.rb
         | 
| 236 | 
            +
            - spec/unit/extensions/math_spec.rb
         | 
| 237 | 
            +
            - spec/unit/session_spec.rb
         | 
| 238 | 
            +
            - spec/unit/shell_spec.rb
         |