music_ids 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -0
- data/README.md +17 -0
- data/lib/music_ids/id.rb +4 -0
- data/lib/music_ids/version.rb +1 -1
- data/music_ids.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22286ceddecf6098863e6459e55d3bb7367e2ffc
|
4
|
+
data.tar.gz: 1be8da113d0544deab68d16c24c6d5ce7c8c5d8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b15a0fb90d6e058dcc393d2c6eeecaddde5b788a8c43d23af6ed6f71f1bbc6106da2d5f43ae20d009aff6b08228907fea07678fdcc8a3a7c2fc659efc0201d2
|
7
|
+
data.tar.gz: 0b2479bed3a4db34a674beb82dbf2d7881d0fbc532926a61b4429b934542cb5b4fa658f0752804da2398eacea21f3e24590462c170d8842a9f05a085f6a62c5d
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -73,6 +73,23 @@ grid.as(:prefixed) #=> 'GRID:A1-2425G-ABC1234002-M'
|
|
73
73
|
MusicIds::GRid.parse(grid) == grid #=> true
|
74
74
|
```
|
75
75
|
|
76
|
+
Support for `as_json` is included so the basic JSON generation case will work:
|
77
|
+
|
78
|
+
```ruby
|
79
|
+
require 'music_ids'
|
80
|
+
require 'json'
|
81
|
+
|
82
|
+
|
83
|
+
isrc = MusicIds::ISRC.parse('FRZ039800212')
|
84
|
+
grid = MusicIds::GRid.parse('A12425GABC1234002M')
|
85
|
+
|
86
|
+
isrc.as_json #=> 'FRZ039800212'
|
87
|
+
grid.as_json #=> 'A12425GABC1234002M'
|
88
|
+
|
89
|
+
JSON.generate({isrc: isrc, grid: grid})
|
90
|
+
#=> "{\"isrc\":\"FRZ039800212\",\"grid\":\"A12425GABC1234002M\"}"
|
91
|
+
```
|
92
|
+
|
76
93
|
## Development
|
77
94
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
78
95
|
`bin/console` for an interactive prompt that will allow you to experiment.
|
data/lib/music_ids/id.rb
CHANGED
data/lib/music_ids/version.rb
CHANGED
data/music_ids.gemspec
CHANGED
@@ -21,7 +21,7 @@ There are often several ways that these IDs can be written, so the classes provi
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
|
-
spec.add_development_dependency "bundler", "~> 1.
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
25
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
26
26
|
spec.add_development_dependency "rspec", "~> 3"
|
27
27
|
spec.add_development_dependency "yard"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: music_ids
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Patterson
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.7'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|