iremix-ruby 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +20 -0
- data/.rspec +2 -0
- data/.rvmrc +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +42 -0
- data/LICENSE +22 -0
- data/README.md +35 -0
- data/Rakefile +29 -0
- data/fixtures/cassettes/initialize_a_new_client.yml +70 -0
- data/iremix-ruby.gemspec +25 -0
- data/lib/iremix.rb +4 -0
- data/lib/iremix/all.rb +3 -0
- data/lib/iremix/client.rb +13 -0
- data/lib/iremix/config.rb +8 -0
- data/lib/iremix/version.rb +5 -0
- data/lib/iremix/video.rb +14 -0
- data/spec/iremix/client_spec.rb +11 -0
- data/spec/iremix/video_spec.rb +18 -0
- data/spec/spec_helper.rb +11 -0
- data/spec/vcr_helper.rb +6 -0
- metadata +138 -0
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use --create 1.9.3@iremix-ruby
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
iremix-ruby (0.0.1)
|
5
|
+
active_support
|
6
|
+
json
|
7
|
+
typhoeus
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
active_support (3.0.0)
|
13
|
+
activesupport (= 3.0.0)
|
14
|
+
activesupport (3.0.0)
|
15
|
+
addressable (2.2.7)
|
16
|
+
crack (0.3.1)
|
17
|
+
diff-lcs (1.1.3)
|
18
|
+
json (1.6.6)
|
19
|
+
mime-types (1.18)
|
20
|
+
rspec (2.9.0)
|
21
|
+
rspec-core (~> 2.9.0)
|
22
|
+
rspec-expectations (~> 2.9.0)
|
23
|
+
rspec-mocks (~> 2.9.0)
|
24
|
+
rspec-core (2.9.0)
|
25
|
+
rspec-expectations (2.9.1)
|
26
|
+
diff-lcs (~> 1.1.3)
|
27
|
+
rspec-mocks (2.9.0)
|
28
|
+
typhoeus (0.3.3)
|
29
|
+
mime-types
|
30
|
+
vcr (2.1.1)
|
31
|
+
webmock (1.8.6)
|
32
|
+
addressable (>= 2.2.7)
|
33
|
+
crack (>= 0.1.7)
|
34
|
+
|
35
|
+
PLATFORMS
|
36
|
+
ruby
|
37
|
+
|
38
|
+
DEPENDENCIES
|
39
|
+
iremix-ruby!
|
40
|
+
rspec
|
41
|
+
vcr
|
42
|
+
webmock
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Joe Sak
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
iremix-ruby
|
2
|
+
===========
|
3
|
+
|
4
|
+
Installation
|
5
|
+
============
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
# in a bundler Gemfile
|
9
|
+
gem 'iremix-ruby', '~> 0.0.1'
|
10
|
+
```
|
11
|
+
|
12
|
+
```
|
13
|
+
# or manually
|
14
|
+
gem install iremix-ruby
|
15
|
+
```
|
16
|
+
|
17
|
+
Testing
|
18
|
+
=======
|
19
|
+
|
20
|
+
|
21
|
+
```
|
22
|
+
# Clone the project, change into the project's directory
|
23
|
+
# If you have RVM enabled, choose (y)es to trust the .rvmrc
|
24
|
+
git clone git://github.com/neotericdesign/iremix-ruby.git
|
25
|
+
cd iremix-ruby
|
26
|
+
|
27
|
+
# Generate the test config file
|
28
|
+
# Fill in your oAuth key and secret in the resulting spec/support/iremix_config.rb
|
29
|
+
rake test:config
|
30
|
+
|
31
|
+
# Install bundler, bundle the gem's dependencies, and run the test suite
|
32
|
+
gem install bundler
|
33
|
+
bundle
|
34
|
+
rspec
|
35
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
require "bundler/gem_tasks"
|
3
|
+
|
4
|
+
namespace :test do
|
5
|
+
desc "Install an empty config file for testing iremix"
|
6
|
+
task :config do
|
7
|
+
unless File.exists?('spec/support/iremix_config.rb')
|
8
|
+
system "mkdir spec/support" unless File.directory?('spec/support')
|
9
|
+
|
10
|
+
file = File.open('spec/support/iremix_config.rb', 'w') do |f|
|
11
|
+
f.write <<-CODE
|
12
|
+
require 'iremix'
|
13
|
+
|
14
|
+
HYDRA = Typhoeus::Hydra.new
|
15
|
+
key = 'fill in your key'
|
16
|
+
secret = 'fill in your secret'
|
17
|
+
protocol = 'http://'
|
18
|
+
host = 'dev.iremix.me'
|
19
|
+
|
20
|
+
Iremix::Config.hydra = HYDRA
|
21
|
+
Iremix::Config.consumer_key = key
|
22
|
+
Iremix::Config.consumer_secret = secret
|
23
|
+
Iremix::Config.protocol = protocol
|
24
|
+
Iremix::Config.host = host
|
25
|
+
CODE
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://dev.iremix.me/oauth/authorize
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 302
|
13
|
+
message: !binary |-
|
14
|
+
TW92ZWQgVGVtcG9yYXJpbHk=
|
15
|
+
headers:
|
16
|
+
!binary "U2VydmVy":
|
17
|
+
- !binary |-
|
18
|
+
bmdpbng=
|
19
|
+
!binary "RGF0ZQ==":
|
20
|
+
- !binary |-
|
21
|
+
VGh1LCAyNiBBcHIgMjAxMiAyMjozMToxNCBHTVQ=
|
22
|
+
!binary "Q29udGVudC1UeXBl":
|
23
|
+
- !binary |-
|
24
|
+
dGV4dC9odG1sOyBjaGFyc2V0PXV0Zi04
|
25
|
+
!binary "Q29ubmVjdGlvbg==":
|
26
|
+
- !binary |-
|
27
|
+
a2VlcC1hbGl2ZQ==
|
28
|
+
!binary "TG9jYXRpb24=":
|
29
|
+
- !binary |-
|
30
|
+
aHR0cDovL2Rldi5pcmVtaXgubWUvdXNlcnMvc2lnbl9pbg==
|
31
|
+
!binary "Q2FjaGUtQ29udHJvbA==":
|
32
|
+
- !binary |-
|
33
|
+
bm8tY2FjaGU=
|
34
|
+
!binary "WC1VYS1Db21wYXRpYmxl":
|
35
|
+
- !binary |-
|
36
|
+
SUU9RWRnZSxjaHJvbWU9MQ==
|
37
|
+
!binary "U2V0LUNvb2tpZQ==":
|
38
|
+
- !binary |-
|
39
|
+
X3JlbWl4X3JhaWxzM19zZXNzaW9uPUJBaDdDRWtpRDNObGMzTnBiMjVmYVdR
|
40
|
+
R09nWkZSaUlsWldRM1ltWTBPREU1TVRSa1pHUXlNVEpqTVdFNVptTmtNamMx
|
41
|
+
T1RBek1UZEpJaE4xYzJWeVgzSmxkSFZ5Ymw5MGJ3WTdBRVlpRlM5dllYVjBh
|
42
|
+
QzloZFhSb2IzSnBlbVZKSWdwbWJHRnphQVk3QUVaSlF6b2xRV04wYVc5dVJH
|
43
|
+
bHpjR0YwWTJnNk9rWnNZWE5vT2pwR2JHRnphRWhoYzJoN0Jqb0tZV3hsY25S
|
44
|
+
SklnWWdCanNBVkFZNkNrQjFjMlZrYnpvSVUyVjBCam9LUUdoaGMyaDdBQSUz
|
45
|
+
RCUzRC0tNmUyYmQ2NTRjMDBjOTFkYTU1MzhhMzkwM2I3MzllNjcyZGQ2NDA5
|
46
|
+
NjsgcGF0aD0vOyBIdHRwT25seQ==
|
47
|
+
!binary "WC1SdW50aW1l":
|
48
|
+
- !binary |-
|
49
|
+
MC4wNTA4ODI=
|
50
|
+
!binary "Q29udGVudC1MZW5ndGg=":
|
51
|
+
- !binary |-
|
52
|
+
MTAw
|
53
|
+
!binary "WC1WYXJuaXNo":
|
54
|
+
- !binary |-
|
55
|
+
ODg4NDMyNDEw
|
56
|
+
!binary "QWdl":
|
57
|
+
- !binary |-
|
58
|
+
MA==
|
59
|
+
!binary "Vmlh":
|
60
|
+
- !binary |-
|
61
|
+
MS4xIHZhcm5pc2g=
|
62
|
+
body:
|
63
|
+
encoding: ASCII-8BIT
|
64
|
+
string: !binary |-
|
65
|
+
PGh0bWw+PGJvZHk+WW91IGFyZSBiZWluZyA8YSBocmVmPSJodHRwOi8vZGV2
|
66
|
+
LmlyZW1peC5tZS91c2Vycy9zaWduX2luIj5yZWRpcmVjdGVkPC9hPi48L2Jv
|
67
|
+
ZHk+PC9odG1sPg==
|
68
|
+
http_version:
|
69
|
+
recorded_at: Thu, 26 Apr 2012 22:31:14 GMT
|
70
|
+
recorded_with: VCR 2.1.1
|
data/iremix-ruby.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/iremix/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = %w(Joe Sak, Neoteric Design)
|
6
|
+
gem.email = %w(joe@neotericdesign.com)
|
7
|
+
gem.description = %q{Not yet}
|
8
|
+
gem.summary = %q{Not yet}
|
9
|
+
gem.homepage = ""
|
10
|
+
|
11
|
+
gem.files = `git ls-files`.split($\)
|
12
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
|
+
gem.name = "iremix-ruby"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = Iremix::Ruby::VERSION
|
17
|
+
|
18
|
+
gem.add_dependency 'active_support'
|
19
|
+
gem.add_dependency 'typhoeus'
|
20
|
+
gem.add_dependency 'json'
|
21
|
+
|
22
|
+
gem.add_development_dependency 'rspec'
|
23
|
+
gem.add_development_dependency 'vcr'
|
24
|
+
gem.add_development_dependency 'webmock'
|
25
|
+
end
|
data/lib/iremix.rb
ADDED
data/lib/iremix/all.rb
ADDED
data/lib/iremix/video.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require './spec/support/iremix_config'
|
2
|
+
require 'iremix/video'
|
3
|
+
|
4
|
+
module Iremix
|
5
|
+
describe Video do
|
6
|
+
describe ".all" do
|
7
|
+
it "queues a request for videos" do
|
8
|
+
request = stub(:request)
|
9
|
+
Typhoeus::Request.should_receive(:new)
|
10
|
+
.with(Video.get_all_url)
|
11
|
+
.and_return(request)
|
12
|
+
Iremix::Config.hydra.should_receive(:queue)
|
13
|
+
.with(request)
|
14
|
+
Video.all
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# Require this file using `require "spec_helper.rb"` to ensure that it is only
|
4
|
+
# loaded once.
|
5
|
+
#
|
6
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
7
|
+
RSpec.configure do |config|
|
8
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
9
|
+
config.run_all_when_everything_filtered = true
|
10
|
+
config.filter_run :focus
|
11
|
+
end
|
data/spec/vcr_helper.rb
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
VCR.configure do |config|
|
2
|
+
config.cassette_library_dir = "fixtures/cassettes"
|
3
|
+
config.hook_into :webmock
|
4
|
+
config.filter_sensitive_data("<CONSUMER KEY>") { Iremix::Client.config.consumer_key }
|
5
|
+
config.filter_sensitive_data("<CONSUMER SECRET>") { Iremix::Client.config.consumer_key }
|
6
|
+
end
|
metadata
ADDED
@@ -0,0 +1,138 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: iremix-ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Joe
|
9
|
+
- Sak,
|
10
|
+
- Neoteric
|
11
|
+
- Design
|
12
|
+
autorequire:
|
13
|
+
bindir: bin
|
14
|
+
cert_chain: []
|
15
|
+
date: 2012-05-01 00:00:00.000000000 Z
|
16
|
+
dependencies:
|
17
|
+
- !ruby/object:Gem::Dependency
|
18
|
+
name: active_support
|
19
|
+
requirement: &2162950500 !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
21
|
+
requirements:
|
22
|
+
- - ! '>='
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: '0'
|
25
|
+
type: :runtime
|
26
|
+
prerelease: false
|
27
|
+
version_requirements: *2162950500
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: typhoeus
|
30
|
+
requirement: &2162966440 !ruby/object:Gem::Requirement
|
31
|
+
none: false
|
32
|
+
requirements:
|
33
|
+
- - ! '>='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
type: :runtime
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: *2162966440
|
39
|
+
- !ruby/object:Gem::Dependency
|
40
|
+
name: json
|
41
|
+
requirement: &2162966020 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
type: :runtime
|
48
|
+
prerelease: false
|
49
|
+
version_requirements: *2162966020
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
name: rspec
|
52
|
+
requirement: &2162965600 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ! '>='
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '0'
|
58
|
+
type: :development
|
59
|
+
prerelease: false
|
60
|
+
version_requirements: *2162965600
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: vcr
|
63
|
+
requirement: &2162965180 !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
type: :development
|
70
|
+
prerelease: false
|
71
|
+
version_requirements: *2162965180
|
72
|
+
- !ruby/object:Gem::Dependency
|
73
|
+
name: webmock
|
74
|
+
requirement: &2162964760 !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ! '>='
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
type: :development
|
81
|
+
prerelease: false
|
82
|
+
version_requirements: *2162964760
|
83
|
+
description: Not yet
|
84
|
+
email:
|
85
|
+
- joe@neotericdesign.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- .gitignore
|
91
|
+
- .rspec
|
92
|
+
- .rvmrc
|
93
|
+
- Gemfile
|
94
|
+
- Gemfile.lock
|
95
|
+
- LICENSE
|
96
|
+
- README.md
|
97
|
+
- Rakefile
|
98
|
+
- fixtures/cassettes/initialize_a_new_client.yml
|
99
|
+
- iremix-ruby.gemspec
|
100
|
+
- lib/iremix.rb
|
101
|
+
- lib/iremix/all.rb
|
102
|
+
- lib/iremix/client.rb
|
103
|
+
- lib/iremix/config.rb
|
104
|
+
- lib/iremix/version.rb
|
105
|
+
- lib/iremix/video.rb
|
106
|
+
- spec/iremix/client_spec.rb
|
107
|
+
- spec/iremix/video_spec.rb
|
108
|
+
- spec/spec_helper.rb
|
109
|
+
- spec/vcr_helper.rb
|
110
|
+
homepage: ''
|
111
|
+
licenses: []
|
112
|
+
post_install_message:
|
113
|
+
rdoc_options: []
|
114
|
+
require_paths:
|
115
|
+
- lib
|
116
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
117
|
+
none: false
|
118
|
+
requirements:
|
119
|
+
- - ! '>='
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
122
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
|
+
none: false
|
124
|
+
requirements:
|
125
|
+
- - ! '>='
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
128
|
+
requirements: []
|
129
|
+
rubyforge_project:
|
130
|
+
rubygems_version: 1.8.16
|
131
|
+
signing_key:
|
132
|
+
specification_version: 3
|
133
|
+
summary: Not yet
|
134
|
+
test_files:
|
135
|
+
- spec/iremix/client_spec.rb
|
136
|
+
- spec/iremix/video_spec.rb
|
137
|
+
- spec/spec_helper.rb
|
138
|
+
- spec/vcr_helper.rb
|