music_story 1.0.2 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 83d4014cc05ab7cb88afb7a77bfb23f811116a74
4
+ data.tar.gz: abd823c82759eb43cbb53d930c16f8fbf3473684
5
+ SHA512:
6
+ metadata.gz: b45fceebaa91f0073f93911a810280a2cffe6b4ba7b276adbe72ba9d57944f667fea0700daf4729f2bd22f490f9c1d719ba20f81e5b5b15b6eacbdcd797477cb
7
+ data.tar.gz: 026efcd963c12bb5fdc967427e4bf07c00da6b26ae987411ea44493e6ce472eaca3d4c92b6291cca621465b7ad6a911469a3c5033a6b89d26cafbea3f8400113
data/README.md ADDED
@@ -0,0 +1,28 @@
1
+ [![Build Status](https://travis-ci.org/mediasp/music_story.svg?branch=master)](https://travis-ci.org/mediasp/music_story)
2
+ [![Gem Version](https://badge.fury.io/rb/music_story.svg)](http://badge.fury.io/rb/music_story)
3
+
4
+ # Music Story
5
+
6
+ Wrapper code for MusicStory data products.
7
+
8
+ Usage:
9
+
10
+ ```ruby
11
+ MusicStory::XMLParser.each_in_file('music-story-data.xml') do |artist|
12
+ puts artist.name
13
+ puts artist.plain_text_bio
14
+ puts artist.main_genres[0].id
15
+ # see MusicStory::{Artist,Genre} for more available properties
16
+ end
17
+ ```
18
+
19
+ Should be able to cope with big XML files, as it uses an XML::Reader to scan through the file one artist at a time; only the current artist object is kept in memory. (Although only tried it on a 330KB file so far so YMMV...)
20
+
21
+ ## License
22
+
23
+ Released under the MIT license.
24
+
25
+ ## Version Notes.
26
+ ### 2.0.0
27
+ * requires at least ruby 1.9.3
28
+ * changed the gem requirement from our local 'persistence' gem to the 'hold' gem available on rubygems.
data/lib/music_story.rb CHANGED
@@ -18,8 +18,8 @@ require 'music_story/model/genre'
18
18
  require 'music_story/repository/artist_xml_file'
19
19
 
20
20
  require 'sequel'
21
- require 'persistence'
22
- require 'persistence/sequel'
21
+ require 'hold'
22
+ require 'hold/sequel'
23
23
  require 'music_story/repository/artist_sequel'
24
24
  require 'music_story/repository/genre_sequel'
25
25
  require 'music_story/repository/sequel'
@@ -1,4 +1,4 @@
1
1
  module MusicStory
2
- VERSION = '1.0.2'
2
+ VERSION = '2.0.0'
3
3
  end
4
4
 
metadata CHANGED
@@ -1,197 +1,199 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: music_story
3
- version: !ruby/object:Gem::Version
4
- hash: 19
5
- prerelease:
6
- segments:
7
- - 1
8
- - 0
9
- - 2
10
- version: 1.0.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.0.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Matthew Willson
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2012-10-03 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
11
+ date: 2014-05-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
21
14
  name: sequel
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 43
29
- segments:
30
- - 3
31
- - 11
32
- - 0
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
33
19
  version: 3.11.0
34
20
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: persistence
38
21
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
42
- - - ~>
43
- - !ruby/object:Gem::Version
44
- hash: 17
45
- segments:
46
- - 0
47
- - 3
48
- - 1
49
- version: 0.3.1
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 3.11.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: hold
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.0'
50
34
  type: :runtime
51
- version_requirements: *id002
52
- - !ruby/object:Gem::Dependency
53
- name: thin_models
54
35
  prerelease: false
55
- requirement: &id003 !ruby/object:Gem::Requirement
56
- none: false
57
- requirements:
58
- - - ~>
59
- - !ruby/object:Gem::Version
60
- hash: 19
61
- segments:
62
- - 0
63
- - 1
64
- - 4
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: thin_models
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
65
47
  version: 0.1.4
66
48
  type: :runtime
67
- version_requirements: *id003
68
- - !ruby/object:Gem::Dependency
69
- name: nokogiri
70
49
  prerelease: false
71
- requirement: &id004 !ruby/object:Gem::Requirement
72
- none: false
73
- requirements:
74
- - - ~>
75
- - !ruby/object:Gem::Version
76
- hash: 3
77
- segments:
78
- - 1
79
- - 5
80
- - 0
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 0.1.4
55
+ - !ruby/object:Gem::Dependency
56
+ name: nokogiri
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
81
61
  version: 1.5.0
82
62
  type: :runtime
83
- version_requirements: *id004
84
- - !ruby/object:Gem::Dependency
85
- name: net-sftp
86
63
  prerelease: false
87
- requirement: &id005 !ruby/object:Gem::Requirement
88
- none: false
89
- requirements:
90
- - - ">="
91
- - !ruby/object:Gem::Version
92
- hash: 3
93
- segments:
94
- - 0
95
- version: "0"
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 1.5.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: net-sftp
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
96
76
  type: :runtime
97
- version_requirements: *id005
98
- - !ruby/object:Gem::Dependency
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rake
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
99
98
  name: minitest
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
100
105
  prerelease: false
101
- requirement: &id006 !ruby/object:Gem::Requirement
102
- none: false
103
- requirements:
104
- - - ">="
105
- - !ruby/object:Gem::Version
106
- hash: 3
107
- segments:
108
- - 0
109
- version: "0"
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: minitest-spec
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
110
118
  type: :development
111
- version_requirements: *id006
112
- - !ruby/object:Gem::Dependency
113
- name: sqlite3
114
119
  prerelease: false
115
- requirement: &id007 !ruby/object:Gem::Requirement
116
- none: false
117
- requirements:
118
- - - ">="
119
- - !ruby/object:Gem::Version
120
- hash: 3
121
- segments:
122
- - 0
123
- version: "0"
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: sqlite3
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
124
132
  type: :development
125
- version_requirements: *id007
126
- - !ruby/object:Gem::Dependency
127
- name: mock_sftp
128
133
  prerelease: false
129
- requirement: &id008 !ruby/object:Gem::Requirement
130
- none: false
131
- requirements:
132
- - - ">="
133
- - !ruby/object:Gem::Version
134
- hash: 3
135
- segments:
136
- - 0
137
- version: "0"
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: mock_sftp
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
138
146
  type: :development
139
- version_requirements: *id008
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
140
153
  description:
141
- email:
142
- - matthew@playlouder.com
154
+ email:
155
+ - mark@mediasp.com
156
+ - tom@mediasp.com
157
+ - devs@playlouder.com
143
158
  executables: []
144
-
145
159
  extensions: []
146
-
147
160
  extra_rdoc_files: []
148
-
149
- files:
150
- - lib/music_story/version.rb
151
- - lib/music_story/model/genre.rb
152
- - lib/music_story/model/batch.rb
161
+ files:
162
+ - README.md
163
+ - lib/music_story.rb
153
164
  - lib/music_story/model/artist.rb
154
- - lib/music_story/utils/html_to_text.rb
155
- - lib/music_story/utils/xml_to_db_importer.rb
156
- - lib/music_story/repository/sequel.rb
165
+ - lib/music_story/model/batch.rb
166
+ - lib/music_story/model/genre.rb
167
+ - lib/music_story/repository/artist_sequel.rb
157
168
  - lib/music_story/repository/artist_xml_file.rb
158
169
  - lib/music_story/repository/batch_sftp.rb
159
- - lib/music_story/repository/artist_sequel.rb
160
170
  - lib/music_story/repository/genre_sequel.rb
161
- - lib/music_story.rb
162
- - README.txt
163
- homepage:
164
- licenses: []
165
-
171
+ - lib/music_story/repository/sequel.rb
172
+ - lib/music_story/utils/html_to_text.rb
173
+ - lib/music_story/utils/xml_to_db_importer.rb
174
+ - lib/music_story/version.rb
175
+ homepage: https://github.com/mediasp/music_story
176
+ licenses:
177
+ - MIT
178
+ metadata: {}
166
179
  post_install_message:
167
180
  rdoc_options: []
168
-
169
- require_paths:
181
+ require_paths:
170
182
  - lib
171
- required_ruby_version: !ruby/object:Gem::Requirement
172
- none: false
173
- requirements:
183
+ required_ruby_version: !ruby/object:Gem::Requirement
184
+ requirements:
174
185
  - - ">="
175
- - !ruby/object:Gem::Version
176
- hash: 3
177
- segments:
178
- - 0
179
- version: "0"
180
- required_rubygems_version: !ruby/object:Gem::Requirement
181
- none: false
182
- requirements:
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ required_rubygems_version: !ruby/object:Gem::Requirement
189
+ requirements:
183
190
  - - ">="
184
- - !ruby/object:Gem::Version
185
- hash: 3
186
- segments:
187
- - 0
188
- version: "0"
191
+ - !ruby/object:Gem::Version
192
+ version: '0'
189
193
  requirements: []
190
-
191
194
  rubyforge_project:
192
- rubygems_version: 1.8.24
195
+ rubygems_version: 2.2.2
193
196
  signing_key:
194
- specification_version: 3
197
+ specification_version: 4
195
198
  summary: Wrapper code for the MusicStory data product
196
199
  test_files: []
197
-
data/README.txt DELETED
@@ -1,13 +0,0 @@
1
- Wrapper code for MusicStory data products.
2
-
3
- Usage:
4
-
5
- MusicStory::XMLParser.each_in_file('music-story-data.xml') do |artist|
6
- puts artist.name
7
- puts artist.plain_text_bio
8
- puts artist.main_genres[0].id
9
- # see MusicStory::{Artist,Genre} for more available properties
10
- end
11
-
12
- Should be able to cope with big XML files, as it uses an XML::Reader to scan through
13
- the file one artist at a time; only the current artist object is kept in memory. (Although only tried it on a 330KB file so far so YMMV...)