stratify-itunes 0.1.3.1 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,97 +1,97 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stratify-itunes (0.1.3)
4
+ stratify-itunes (0.1.4)
5
5
  itunes-library (~> 0.1.1)
6
- railties (~> 3.1.0)
7
- stratify-base (~> 0.1.3)
6
+ railties (~> 3.2.0)
7
+ stratify-base (~> 0.1.4)
8
8
 
9
9
  GEM
10
10
  remote: http://rubygems.org/
11
11
  specs:
12
- actionpack (3.1.0)
13
- activemodel (= 3.1.0)
14
- activesupport (= 3.1.0)
12
+ actionpack (3.2.3)
13
+ activemodel (= 3.2.3)
14
+ activesupport (= 3.2.3)
15
15
  builder (~> 3.0.0)
16
16
  erubis (~> 2.7.0)
17
- i18n (~> 0.6)
18
- rack (~> 1.3.2)
19
- rack-cache (~> 1.0.3)
20
- rack-mount (~> 0.8.2)
17
+ journey (~> 1.0.1)
18
+ rack (~> 1.4.0)
19
+ rack-cache (~> 1.2)
21
20
  rack-test (~> 0.6.1)
22
- sprockets (~> 2.0.0)
23
- activemodel (3.1.0)
24
- activesupport (= 3.1.0)
25
- bcrypt-ruby (~> 3.0.0)
21
+ sprockets (~> 2.1.2)
22
+ activemodel (3.2.3)
23
+ activesupport (= 3.2.3)
26
24
  builder (~> 3.0.0)
25
+ activesupport (3.2.3)
27
26
  i18n (~> 0.6)
28
- activesupport (3.1.0)
29
27
  multi_json (~> 1.0)
30
- bcrypt-ruby (3.0.0)
31
- bson (1.3.1)
32
- bson_ext (1.3.1)
28
+ bson (1.6.2)
29
+ bson_ext (1.6.2)
30
+ bson (~> 1.6.2)
33
31
  builder (3.0.0)
34
- database_cleaner (0.6.7)
35
- diff-lcs (1.1.2)
32
+ database_cleaner (0.7.2)
33
+ diff-lcs (1.1.3)
36
34
  erubis (2.7.0)
37
35
  fakeweb (1.3.0)
38
36
  hike (1.2.1)
39
37
  i18n (0.6.0)
40
38
  itunes-library (0.1.1)
41
39
  plist
42
- mongo (1.3.1)
43
- bson (>= 1.3.1)
44
- mongoid (2.0.2)
45
- activemodel (~> 3.0)
40
+ journey (1.0.3)
41
+ json (1.7.0)
42
+ mongo (1.6.2)
43
+ bson (~> 1.6.2)
44
+ mongoid (2.4.9)
45
+ activemodel (~> 3.1)
46
46
  mongo (~> 1.3)
47
47
  tzinfo (~> 0.3.22)
48
- multi_json (1.0.3)
48
+ multi_json (1.3.2)
49
49
  plist (3.1.0)
50
- rack (1.3.2)
51
- rack-cache (1.0.3)
50
+ rack (1.4.1)
51
+ rack-cache (1.2)
52
52
  rack (>= 0.4)
53
- rack-mount (0.8.3)
54
- rack (>= 1.0.0)
55
53
  rack-ssl (1.3.2)
56
54
  rack
57
55
  rack-test (0.6.1)
58
56
  rack (>= 1.0)
59
- railties (3.1.0)
60
- actionpack (= 3.1.0)
61
- activesupport (= 3.1.0)
57
+ railties (3.2.3)
58
+ actionpack (= 3.2.3)
59
+ activesupport (= 3.2.3)
62
60
  rack-ssl (~> 1.3.2)
63
61
  rake (>= 0.8.7)
64
62
  rdoc (~> 3.4)
65
63
  thor (~> 0.14.6)
66
- rake (0.9.2)
67
- rdoc (3.9.4)
68
- rspec (2.6.0)
69
- rspec-core (~> 2.6.0)
70
- rspec-expectations (~> 2.6.0)
71
- rspec-mocks (~> 2.6.0)
72
- rspec-core (2.6.3)
73
- rspec-expectations (2.6.0)
74
- diff-lcs (~> 1.1.2)
75
- rspec-mocks (2.6.0)
76
- sprockets (2.0.0)
64
+ rake (0.9.2.2)
65
+ rdoc (3.12)
66
+ json (~> 1.4)
67
+ rspec (2.9.0)
68
+ rspec-core (~> 2.9.0)
69
+ rspec-expectations (~> 2.9.0)
70
+ rspec-mocks (~> 2.9.0)
71
+ rspec-core (2.9.0)
72
+ rspec-expectations (2.9.1)
73
+ diff-lcs (~> 1.1.3)
74
+ rspec-mocks (2.9.0)
75
+ sprockets (2.1.3)
77
76
  hike (~> 1.2)
78
77
  rack (~> 1.0)
79
- tilt (!= 1.3.0, ~> 1.1)
80
- stratify-base (0.1.3)
81
- bson_ext (~> 1.3.1)
82
- mongoid (~> 2.0.2)
78
+ tilt (~> 1.1, != 1.3.0)
79
+ stratify-base (0.1.4)
80
+ bson_ext (~> 1.6.0)
81
+ mongoid (~> 2.4.0)
83
82
  tilt (~> 1.3.2)
84
83
  thor (0.14.6)
85
84
  tilt (1.3.3)
86
- tzinfo (0.3.29)
85
+ tzinfo (0.3.33)
87
86
  vcr (1.10.0)
88
87
 
89
88
  PLATFORMS
90
89
  ruby
91
90
 
92
91
  DEPENDENCIES
93
- database_cleaner (~> 0.6.7)
92
+ database_cleaner (~> 0.7.2)
94
93
  fakeweb (~> 1.3.0)
95
- rspec (~> 2.6.0)
94
+ rake (~> 0.9.2)
95
+ rspec (~> 2.9.0)
96
96
  stratify-itunes!
97
97
  vcr (~> 1.10.0)
data/LICENSE CHANGED
@@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
17
  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18
18
  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19
19
  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  Stratify is developed and tested with the following dependencies.
6
6
 
7
7
  * Ruby 1.9.2 (See `.rvmrc` for the specific version.)
8
- * MongoDB 1.8
8
+ * MongoDB 2.0
9
9
 
10
10
  ## Development
11
11
 
data/Rakefile CHANGED
@@ -7,4 +7,4 @@ RSpec::Core::RakeTask.new(:spec) do |spec|
7
7
  spec.pattern = FileList['spec/**/*_spec.rb']
8
8
  end
9
9
 
10
- task :default => :spec
10
+ task :default => :spec
Binary file
Binary file
@@ -21,7 +21,7 @@ module Stratify
21
21
  join_fields_with_separator album, year, genre
22
22
  end
23
23
  end
24
-
24
+
25
25
  def season_number
26
26
  return unless @activity.season_number
27
27
  "Season #{@activity.season_number}"
@@ -32,20 +32,20 @@ module Stratify
32
32
  return unless number
33
33
  "Episode #{number}"
34
34
  end
35
-
35
+
36
36
  def method_missing(*args)
37
37
  @activity.send(*args)
38
38
  end
39
-
39
+
40
40
  private
41
41
 
42
42
  def separator
43
43
  "\u2022"
44
44
  end
45
-
45
+
46
46
  def join_fields_with_separator(*fields)
47
47
  fields.reject(&:blank?).join(" #{separator} ")
48
48
  end
49
49
  end
50
50
  end
51
- end
51
+ end
@@ -34,7 +34,7 @@ module Stratify
34
34
  :persistent_id => track.persistent_id,
35
35
  :podcast => track.podcast?,
36
36
  :season_number => track.season_number,
37
- :track_number => track.number,
37
+ :track_number => track.number,
38
38
  :tv_show => track.tv_show?,
39
39
  :year => track.year,
40
40
  })
@@ -53,5 +53,5 @@ module Stratify
53
53
  sorted_tracks.last(limit)
54
54
  end
55
55
  end
56
- end
56
+ end
57
57
  end
@@ -1,5 +1,5 @@
1
1
  module Stratify
2
2
  module ITunes
3
- VERSION = "0.1.3.1"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
@@ -6,11 +6,11 @@ describe "collecting and storing iTunes data", :database => true do
6
6
  collector = Stratify::ITunes::Collector.create!(:library_path => itunes_library_path)
7
7
  collector.run
8
8
  end
9
-
9
+
10
10
  it "collects and stores recently-played music from iTunes" do
11
11
  Stratify::ITunes::Activity.where(
12
12
  :persistent_id => "83B3927542025FDC",
13
- :name => "Smells Like Teen Spirit",
13
+ :name => "Smells Like Teen Spirit",
14
14
  :album => "Nevermind",
15
15
  :artist => "Nirvana",
16
16
  :composer => "Kurt Cobain, David Grohl, Chris Novoselic",
@@ -24,7 +24,7 @@ describe "collecting and storing iTunes data", :database => true do
24
24
  it "collects and stores recently-played podcasts from iTunes" do
25
25
  Stratify::ITunes::Activity.where(
26
26
  :persistent_id => "90228FA50E9DF82D",
27
- :name => "Tech News Today 186: Who Are Yooodle?",
27
+ :name => "Tech News Today 186: Who Are Yooodle?",
28
28
  :album => "Tech News Today",
29
29
  :artist => "Tom Merritt, Becky Worley, Sarah Lane and Jason Howell",
30
30
  :genre => "Podcast",
@@ -38,7 +38,7 @@ describe "collecting and storing iTunes data", :database => true do
38
38
  it "collects and stores recently-played TV shows from iTunes" do
39
39
  Stratify::ITunes::Activity.where(
40
40
  :persistent_id => "401802E7B506C475",
41
- :name => "A No-Rough-Stuff Type Deal",
41
+ :name => "A No-Rough-Stuff Type Deal",
42
42
  :album => "Breaking Bad, Season 1",
43
43
  :artist => "Breaking Bad",
44
44
  :genre => "Drama",
@@ -53,7 +53,7 @@ describe "collecting and storing iTunes data", :database => true do
53
53
  it "collects and stores recently-played movies from iTunes" do
54
54
  Stratify::ITunes::Activity.where(
55
55
  :persistent_id => "3B7824E068FB05A6",
56
- :name => "V for Vendetta",
56
+ :name => "V for Vendetta",
57
57
  :genre => "Action & Adventure",
58
58
  :movie => true,
59
59
  :created_at => Time.parse("2011-02-27T23:24:35Z")
@@ -63,13 +63,13 @@ describe "collecting and storing iTunes data", :database => true do
63
63
  it "collects and stores recently-played audiobooks from iTunes" do
64
64
  Stratify::ITunes::Activity.where(
65
65
  :persistent_id => "DB6F370B2A647633",
66
- :name => "Born Standing Up: A Comic's Life (Unabridged)",
66
+ :name => "Born Standing Up: A Comic's Life (Unabridged)",
67
67
  :artist => "Steve Martin",
68
68
  :genre => "Biography & Memoir",
69
69
  :created_at => Time.parse("2011-02-27T21:52:43Z")
70
70
  ).should exist
71
71
  end
72
-
72
+
73
73
  it "does not collect unplayed items from iTunes" do
74
74
  Stratify::ITunes::Activity.where(:persistent_id => "8780A3C7A0117B2B").should_not exist
75
75
  end
@@ -82,7 +82,7 @@ describe "reading a remote iTunes library file", :database => true do
82
82
  itunes_library_path = "http://dl.dropbox.com/u/1234567/iTunes%20Music%20Library.xml"
83
83
  collector = Stratify::ITunes::Collector.create!(:library_path => itunes_library_path)
84
84
  collector.run
85
-
85
+
86
86
  Stratify::ITunes::Activity.where(:persistent_id => "83B3927542025FDC").should exist
87
87
  end
88
88
  end
@@ -4,11 +4,11 @@ describe Stratify::ITunes::Presenter do
4
4
 
5
5
  context "audio track" do
6
6
  before do
7
- @activity = Stratify::ITunes::Activity.new(:name => "In Bloom", :artist => "Nirvana", :album => "Nevermind",
7
+ @activity = Stratify::ITunes::Activity.new(:name => "In Bloom", :artist => "Nirvana", :album => "Nevermind",
8
8
  :year => 1999, :genre => "Rock")
9
9
  @presenter = Stratify::ITunes::Presenter.new(@activity)
10
10
  end
11
-
11
+
12
12
  describe "summary" do
13
13
  it "provides the track name and the artist name" do
14
14
  @presenter.summary.should == "In Bloom \u2022 Nirvana"
@@ -24,7 +24,7 @@ describe Stratify::ITunes::Presenter do
24
24
  @presenter.summary.should == "Untitled \u2022 Nirvana"
25
25
  end
26
26
  end
27
-
27
+
28
28
  describe "details" do
29
29
  it "provides the album, year, and genre" do
30
30
  @presenter.details.should == "Nevermind \u2022 1999 \u2022 Rock"
@@ -46,7 +46,7 @@ describe Stratify::ITunes::Presenter do
46
46
  end
47
47
  end
48
48
  end
49
-
49
+
50
50
  context "TV show" do
51
51
  describe "episode_number" do
52
52
  it "provides the episode number if it is present" do
@@ -67,7 +67,7 @@ describe Stratify::ITunes::Presenter do
67
67
  presenter.episode_number.should == nil
68
68
  end
69
69
  end
70
-
70
+
71
71
  describe "summary" do
72
72
  before do
73
73
  @activity = Stratify::ITunes::Activity.new(:tv_show => true, :name => "Crazy Handful of Nothin", :artist => "Breaking Bad")
@@ -88,7 +88,7 @@ describe Stratify::ITunes::Presenter do
88
88
  @presenter.summary.should == "Untitled \u2022 Breaking Bad"
89
89
  end
90
90
  end
91
-
91
+
92
92
  describe "details" do
93
93
  before do
94
94
  @activity = Stratify::ITunes::Activity.new(:tv_show => true, :season_number => 1, :episode_number => 6, :year => 2008)
@@ -108,12 +108,12 @@ describe Stratify::ITunes::Presenter do
108
108
  @activity.episode_number = nil
109
109
  @presenter.details.should == "Season 1 \u2022 2008"
110
110
  end
111
-
111
+
112
112
  it "omits the year if it is nil" do
113
113
  @activity.year = nil
114
114
  @presenter.details.should == "Season 1 \u2022 Episode 6"
115
115
  end
116
- end
116
+ end
117
117
  end
118
118
 
119
119
  context "movie" do
@@ -122,18 +122,18 @@ describe Stratify::ITunes::Presenter do
122
122
  :year => 2006, :genre => "Action & Adventure")
123
123
  @presenter = Stratify::ITunes::Presenter.new(@activity)
124
124
  end
125
-
125
+
126
126
  describe "summary" do
127
127
  it "provides the name" do
128
128
  @presenter.summary.should == "V for Vendetta"
129
129
  end
130
130
  end
131
-
131
+
132
132
  describe "details" do
133
133
  it "provides the year and the genre" do
134
134
  @presenter.details.should == "2006 \u2022 Action & Adventure"
135
135
  end
136
-
136
+
137
137
  it "omits the year if it is nil" do
138
138
  @activity.year = nil
139
139
  @presenter.details.should == "Action & Adventure"
@@ -143,6 +143,6 @@ describe Stratify::ITunes::Presenter do
143
143
  @activity.genre = nil
144
144
  @presenter.details.should == "2006"
145
145
  end
146
- end
146
+ end
147
147
  end
148
148
  end
@@ -19,12 +19,13 @@ Gem::Specification.new do |s|
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
21
 
22
- s.add_runtime_dependency "railties", "~> 3.1.0"
23
- s.add_runtime_dependency "stratify-base", "~> 0.1.3"
22
+ s.add_runtime_dependency "railties", "~> 3.2.0"
23
+ s.add_runtime_dependency "stratify-base", "~> 0.1.4"
24
24
  s.add_runtime_dependency "itunes-library", "~> 0.1.1"
25
25
 
26
- s.add_development_dependency "database_cleaner", "~> 0.6.7"
26
+ s.add_development_dependency "database_cleaner", "~> 0.7.2"
27
27
  s.add_development_dependency "fakeweb", "~> 1.3.0"
28
- s.add_development_dependency "rspec", "~> 2.6.0"
28
+ s.add_development_dependency "rake", "~> 0.9.2"
29
+ s.add_development_dependency "rspec", "~> 2.9.0"
29
30
  s.add_development_dependency "vcr", "~> 1.10.0"
30
31
  end
@@ -3,8 +3,8 @@
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :get
5
5
  uri: http://dl.dropbox.com:80/u/1234567/iTunes%20Music%20Library.xml
6
- body:
7
- headers:
6
+ body:
7
+ headers:
8
8
  response: !ruby/struct:VCR::Response
9
9
  status: !ruby/struct:VCR::ResponseStatus
10
10
  code: 200
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stratify-itunes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3.1
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,33 +9,33 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-06 00:00:00.000000000Z
12
+ date: 2012-04-29 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
16
- requirement: &70302198315640 !ruby/object:Gem::Requirement
16
+ requirement: &70245620492100 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 3.1.0
21
+ version: 3.2.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70302198315640
24
+ version_requirements: *70245620492100
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: stratify-base
27
- requirement: &70302198340280 !ruby/object:Gem::Requirement
27
+ requirement: &70245620477080 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
31
31
  - !ruby/object:Gem::Version
32
- version: 0.1.3
32
+ version: 0.1.4
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70302198340280
35
+ version_requirements: *70245620477080
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: itunes-library
38
- requirement: &70302198339220 !ruby/object:Gem::Requirement
38
+ requirement: &70245620466680 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,21 +43,21 @@ dependencies:
43
43
  version: 0.1.1
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70302198339220
46
+ version_requirements: *70245620466680
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: database_cleaner
49
- requirement: &70302198338340 !ruby/object:Gem::Requirement
49
+ requirement: &70245620462080 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: 0.6.7
54
+ version: 0.7.2
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70302198338340
57
+ version_requirements: *70245620462080
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: fakeweb
60
- requirement: &70302198337240 !ruby/object:Gem::Requirement
60
+ requirement: &70245620455360 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,21 +65,32 @@ dependencies:
65
65
  version: 1.3.0
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70302198337240
68
+ version_requirements: *70245620455360
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: &70245620446500 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ~>
75
+ - !ruby/object:Gem::Version
76
+ version: 0.9.2
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: *70245620446500
69
80
  - !ruby/object:Gem::Dependency
70
81
  name: rspec
71
- requirement: &70302198335700 !ruby/object:Gem::Requirement
82
+ requirement: &70245620573880 !ruby/object:Gem::Requirement
72
83
  none: false
73
84
  requirements:
74
85
  - - ~>
75
86
  - !ruby/object:Gem::Version
76
- version: 2.6.0
87
+ version: 2.9.0
77
88
  type: :development
78
89
  prerelease: false
79
- version_requirements: *70302198335700
90
+ version_requirements: *70245620573880
80
91
  - !ruby/object:Gem::Dependency
81
92
  name: vcr
82
- requirement: &70302198334300 !ruby/object:Gem::Requirement
93
+ requirement: &70245620739980 !ruby/object:Gem::Requirement
83
94
  none: false
84
95
  requirements:
85
96
  - - ~>
@@ -87,7 +98,7 @@ dependencies:
87
98
  version: 1.10.0
88
99
  type: :development
89
100
  prerelease: false
90
- version_requirements: *70302198334300
101
+ version_requirements: *70245620739980
91
102
  description: iTunes plugin for Stratify
92
103
  email:
93
104
  - jason@jasonrudolph.com