gdshowsdb 0.9.0
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.
- checksums.yaml +7 -0
- data/.gitignore +6 -0
- data/.rvmrc +4 -0
- data/.travis.yml +4 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +106 -0
- data/LICENSE.txt +22 -0
- data/README.md +49 -0
- data/Rakefile +4 -0
- data/data/gdshowsdb/1965.yaml +78 -0
- data/data/gdshowsdb/1966.yaml +780 -0
- data/data/gdshowsdb/1967.yaml +857 -0
- data/data/gdshowsdb/1968.yaml +1252 -0
- data/data/gdshowsdb/1969.yaml +1799 -0
- data/data/gdshowsdb/1970.yaml +3547 -0
- data/data/gdshowsdb/1971.yaml +1396 -0
- data/data/gdshowsdb/1972.yaml +6849 -0
- data/data/gdshowsdb/1973.yaml +6229 -0
- data/data/gdshowsdb/1974.yaml +3516 -0
- data/data/gdshowsdb/1975.yaml +207 -0
- data/data/gdshowsdb/1976.yaml +3226 -0
- data/data/gdshowsdb/1977.yaml +4469 -0
- data/data/gdshowsdb/1978.yaml +5681 -0
- data/data/gdshowsdb/1979.yaml +5487 -0
- data/data/gdshowsdb/1980.yaml +7133 -0
- data/data/gdshowsdb/1981.yaml +6347 -0
- data/data/gdshowsdb/1982.yaml +4475 -0
- data/data/gdshowsdb/1983.yaml +4561 -0
- data/data/gdshowsdb/1984.yaml +4431 -0
- data/data/gdshowsdb/1985.yaml +4810 -0
- data/data/gdshowsdb/1986.yaml +3029 -0
- data/data/gdshowsdb/1987.yaml +5958 -0
- data/data/gdshowsdb/1988.yaml +5398 -0
- data/data/gdshowsdb/1989.yaml +4979 -0
- data/data/gdshowsdb/1990.yaml +4941 -0
- data/data/gdshowsdb/1991.yaml +5269 -0
- data/data/gdshowsdb/1992.yaml +3576 -0
- data/data/gdshowsdb/1993.yaml +5178 -0
- data/data/gdshowsdb/1994.yaml +5206 -0
- data/data/gdshowsdb/1995.yaml +2931 -0
- data/data/gdshowsdb/shows-debug.yaml +138 -0
- data/data/gdshowsdb/song_refs.yaml +411 -0
- data/gdshowsdb.gemspec +23 -0
- data/lib/gdshowsdb/db/migrations/001_create_song_ref_table.rb +15 -0
- data/lib/gdshowsdb/db/migrations/002_import_song_refs.rb +14 -0
- data/lib/gdshowsdb/db/migrations/003_create_show_table.rb +22 -0
- data/lib/gdshowsdb/db/migrations/004_create_show_set_table.rb +15 -0
- data/lib/gdshowsdb/db/migrations/005_create_song_table.rb +18 -0
- data/lib/gdshowsdb/db/migrations/006_create_song_occurences_table.rb +17 -0
- data/lib/gdshowsdb/db/migrations/008_add_count_to_song_ref_table.rb +11 -0
- data/lib/gdshowsdb/db/migrations/009_import_shows.rb +45 -0
- data/lib/gdshowsdb/diff.rb +36 -0
- data/lib/gdshowsdb/generators/gdshowsdatabase_generator.rb +17 -0
- data/lib/gdshowsdb/generators/gdshowsdatabase_upgrade_generator.rb +49 -0
- data/lib/gdshowsdb/models/extensions/uuid.rb +9 -0
- data/lib/gdshowsdb/models/show.rb +58 -0
- data/lib/gdshowsdb/models/show_set.rb +40 -0
- data/lib/gdshowsdb/models/song.rb +72 -0
- data/lib/gdshowsdb/models/song_occurence.rb +9 -0
- data/lib/gdshowsdb/models/song_ref.rb +32 -0
- data/lib/gdshowsdb/set_db_extractor.rb +19 -0
- data/lib/gdshowsdb/set_diff.rb +10 -0
- data/lib/gdshowsdb/set_yaml_parser.rb +29 -0
- data/lib/gdshowsdb/show_db_extractor.rb +19 -0
- data/lib/gdshowsdb/show_diff.rb +12 -0
- data/lib/gdshowsdb/show_yaml_parser.rb +20 -0
- data/lib/gdshowsdb/song_db_extractor.rb +21 -0
- data/lib/gdshowsdb/song_diff.rb +10 -0
- data/lib/gdshowsdb/song_ref_db_extractror.rb +18 -0
- data/lib/gdshowsdb/song_ref_diff.rb +12 -0
- data/lib/gdshowsdb/song_ref_yaml_parser.rb +19 -0
- data/lib/gdshowsdb/song_yaml_parser.rb +25 -0
- data/lib/gdshowsdb/templates/update_migration.rb.erb +53 -0
- data/lib/gdshowsdb/version.rb +3 -0
- data/lib/gdshowsdb.rb +45 -0
- data/sample.rb +29 -0
- data/spec/gdshowsdb/diff_spec.rb +69 -0
- data/spec/gdshowsdb/models/show_set_spec.rb +29 -0
- data/spec/gdshowsdb/models/show_spec.rb +13 -0
- data/spec/gdshowsdb/models/song_spec.rb +72 -0
- data/spec/gdshowsdb/set_db_extractor_spec.rb +37 -0
- data/spec/gdshowsdb/set_yaml_parser_spec.rb +74 -0
- data/spec/gdshowsdb/show_db_extractor_spec.rb +25 -0
- data/spec/gdshowsdb/show_yaml_parser_spec.rb +42 -0
- data/spec/gdshowsdb/song_db_extractor_spec.rb +47 -0
- data/spec/gdshowsdb/song_ref_db_extractor_spec.rb +20 -0
- data/spec/gdshowsdb/song_ref_yaml_parser_spec.rb +19 -0
- data/spec/gdshowsdb/song_yaml_parser_spec.rb +93 -0
- data/spec/spec_helper.rb +15 -0
- metadata +186 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: d12787330771b3ab9b4b1d109624efce13737b2c
|
|
4
|
+
data.tar.gz: ac014f427f685fd0989baab38d4ba49aa90dd809
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: d8519d0aabc6b896192759151bf807d748a997bf1fe24944f8fa18e9e7d84e8370f5bff973e19f0773be9f9908b64c923db6e87640ed7980c9ade2ed394433d3
|
|
7
|
+
data.tar.gz: a8d1587ef7f4b13d4acabe4e673e050af7266d57c8966f8e98998d34efeaa9a30041255b4078337f74a00cde3ca12495f3e56d1f5d0fe608821c5c8ae3d0ce69
|
data/.gitignore
ADDED
data/.rvmrc
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
gdshowsdb (0.9.0)
|
|
5
|
+
friendly_id (= 5.0.0.beta4)
|
|
6
|
+
protected_attributes
|
|
7
|
+
rails (~> 4.0.0)
|
|
8
|
+
|
|
9
|
+
GEM
|
|
10
|
+
remote: https://rubygems.org/
|
|
11
|
+
specs:
|
|
12
|
+
actionmailer (4.0.0)
|
|
13
|
+
actionpack (= 4.0.0)
|
|
14
|
+
mail (~> 2.5.3)
|
|
15
|
+
actionpack (4.0.0)
|
|
16
|
+
activesupport (= 4.0.0)
|
|
17
|
+
builder (~> 3.1.0)
|
|
18
|
+
erubis (~> 2.7.0)
|
|
19
|
+
rack (~> 1.5.2)
|
|
20
|
+
rack-test (~> 0.6.2)
|
|
21
|
+
activemodel (4.0.0)
|
|
22
|
+
activesupport (= 4.0.0)
|
|
23
|
+
builder (~> 3.1.0)
|
|
24
|
+
activerecord (4.0.0)
|
|
25
|
+
activemodel (= 4.0.0)
|
|
26
|
+
activerecord-deprecated_finders (~> 1.0.2)
|
|
27
|
+
activesupport (= 4.0.0)
|
|
28
|
+
arel (~> 4.0.0)
|
|
29
|
+
activerecord-deprecated_finders (1.0.3)
|
|
30
|
+
activesupport (4.0.0)
|
|
31
|
+
i18n (~> 0.6, >= 0.6.4)
|
|
32
|
+
minitest (~> 4.2)
|
|
33
|
+
multi_json (~> 1.3)
|
|
34
|
+
thread_safe (~> 0.1)
|
|
35
|
+
tzinfo (~> 0.3.37)
|
|
36
|
+
arel (4.0.0)
|
|
37
|
+
atomic (1.1.13)
|
|
38
|
+
builder (3.1.4)
|
|
39
|
+
diff-lcs (1.2.4)
|
|
40
|
+
erubis (2.7.0)
|
|
41
|
+
friendly_id (5.0.0.beta4)
|
|
42
|
+
activerecord (~> 4.0.0)
|
|
43
|
+
hike (1.2.3)
|
|
44
|
+
i18n (0.6.5)
|
|
45
|
+
mail (2.5.4)
|
|
46
|
+
mime-types (~> 1.16)
|
|
47
|
+
treetop (~> 1.4.8)
|
|
48
|
+
mime-types (1.24)
|
|
49
|
+
minitest (4.7.5)
|
|
50
|
+
multi_json (1.7.9)
|
|
51
|
+
polyglot (0.3.3)
|
|
52
|
+
protected_attributes (1.0.3)
|
|
53
|
+
activemodel (>= 4.0.0, < 5.0)
|
|
54
|
+
rack (1.5.2)
|
|
55
|
+
rack-test (0.6.2)
|
|
56
|
+
rack (>= 1.0)
|
|
57
|
+
rails (4.0.0)
|
|
58
|
+
actionmailer (= 4.0.0)
|
|
59
|
+
actionpack (= 4.0.0)
|
|
60
|
+
activerecord (= 4.0.0)
|
|
61
|
+
activesupport (= 4.0.0)
|
|
62
|
+
bundler (>= 1.3.0, < 2.0)
|
|
63
|
+
railties (= 4.0.0)
|
|
64
|
+
sprockets-rails (~> 2.0.0)
|
|
65
|
+
railties (4.0.0)
|
|
66
|
+
actionpack (= 4.0.0)
|
|
67
|
+
activesupport (= 4.0.0)
|
|
68
|
+
rake (>= 0.8.7)
|
|
69
|
+
thor (>= 0.18.1, < 2.0)
|
|
70
|
+
rake (0.9.2.2)
|
|
71
|
+
rspec (2.14.1)
|
|
72
|
+
rspec-core (~> 2.14.0)
|
|
73
|
+
rspec-expectations (~> 2.14.0)
|
|
74
|
+
rspec-mocks (~> 2.14.0)
|
|
75
|
+
rspec-core (2.14.5)
|
|
76
|
+
rspec-expectations (2.14.2)
|
|
77
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
|
78
|
+
rspec-mocks (2.14.3)
|
|
79
|
+
sprockets (2.10.0)
|
|
80
|
+
hike (~> 1.2)
|
|
81
|
+
multi_json (~> 1.0)
|
|
82
|
+
rack (~> 1.0)
|
|
83
|
+
tilt (~> 1.1, != 1.3.0)
|
|
84
|
+
sprockets-rails (2.0.0)
|
|
85
|
+
actionpack (>= 3.0)
|
|
86
|
+
activesupport (>= 3.0)
|
|
87
|
+
sprockets (~> 2.8)
|
|
88
|
+
sqlite3 (1.3.8)
|
|
89
|
+
thor (0.18.1)
|
|
90
|
+
thread_safe (0.1.2)
|
|
91
|
+
atomic
|
|
92
|
+
tilt (1.4.1)
|
|
93
|
+
treetop (1.4.15)
|
|
94
|
+
polyglot
|
|
95
|
+
polyglot (>= 0.3.1)
|
|
96
|
+
tzinfo (0.3.37)
|
|
97
|
+
|
|
98
|
+
PLATFORMS
|
|
99
|
+
ruby
|
|
100
|
+
|
|
101
|
+
DEPENDENCIES
|
|
102
|
+
gdshowsdb!
|
|
103
|
+
protected_attributes
|
|
104
|
+
rake (~> 0.9.2.2)
|
|
105
|
+
rspec
|
|
106
|
+
sqlite3
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2013 Jeff Smith
|
|
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,49 @@
|
|
|
1
|
+
# Gdshowsdb
|
|
2
|
+
|
|
3
|
+
[ ](https://www.codeship.io/projects/27798)
|
|
4
|
+
|
|
5
|
+
All Grateful Dead show information in a relational database.
|
|
6
|
+
|
|
7
|
+
Hoping to make this freely available database the cannonical resource for all Grateful Dead concert information.
|
|
8
|
+
|
|
9
|
+
Additionally, This Gem can be used as an API to the data.
|
|
10
|
+
|
|
11
|
+
## Using with Ruby
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'gdshowsdb'
|
|
15
|
+
|
|
16
|
+
Gdshowsdb.init()
|
|
17
|
+
Gdshowsdb.load()
|
|
18
|
+
|
|
19
|
+
jack_straw_shows = SongRef.find_by_name('Jack Straw').shows
|
|
20
|
+
|
|
21
|
+
jack_straw_shows.each do |show|
|
|
22
|
+
puts show.title
|
|
23
|
+
end
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Using with Rails
|
|
27
|
+
|
|
28
|
+
Add this to your Gemfile
|
|
29
|
+
```
|
|
30
|
+
gem 'gdshowsdb', :git => 'git://github.com/jefmsmit/gdshowsdb.git'
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Generate the database migrations
|
|
34
|
+
```
|
|
35
|
+
rails generate gdshowsdatabase
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Understanding the Model
|
|
39
|
+
|
|
40
|
+
The `SongRef` class represents the reference data about a song. For example there is only one `SongRef` instance (or database row if you prefer) for "Wharf Rat". This allows us to normalize song names so its always "Goin' Down The Road Feeling Bad" and not sometimes "GDTRFB". A `SongRef` knows the `Shows` where it was performed.
|
|
41
|
+
|
|
42
|
+
The `Show` class is for reprsenting all the particulars about a performance. City, State, Venue, etc.
|
|
43
|
+
|
|
44
|
+
The `ShowSet` class is for representing a segment of a show. That way we can know what was played in the first set version the second versus the encore. I did not call it `Set` in order to avoid confusing with the Ruby class of the same name.
|
|
45
|
+
|
|
46
|
+
The `Song` class is for representing the occurence of a `SongRef`. `Song`s know which set the occurence of a `SongRef` happened in, its position in the `ShowSet` as well as wether it was segued out of.
|
|
47
|
+
|
|
48
|
+
The `SongOccurence` class is named association (think join table in sql) that allows a `Show` to know which `SongRef`s were performed without having to traverse throug the `ShowSet`s. I'm not convinced of this classes value and might remove it.
|
|
49
|
+
|
data/Rakefile
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
1965/05/05:
|
|
3
|
+
:uuid: 45aa67cd-c459-45d4-9d7f-8d4bd0c0dfa7
|
|
4
|
+
:venue: Magoo's Pizza Parlor
|
|
5
|
+
:city: Menlo Park
|
|
6
|
+
:state: CA
|
|
7
|
+
:country: US
|
|
8
|
+
:sets: []
|
|
9
|
+
1965/05/12:
|
|
10
|
+
:uuid: 5a7143b3-f269-4066-aaa9-c1f1bb9feabf
|
|
11
|
+
:venue: Magoo's Pizza Parlor
|
|
12
|
+
:city: Menlo Park
|
|
13
|
+
:state: CA
|
|
14
|
+
:country: US
|
|
15
|
+
:sets: []
|
|
16
|
+
1965/05/27:
|
|
17
|
+
:uuid: 128971ef-286f-4401-a617-28e795a30fe8
|
|
18
|
+
:venue: Magoo's Pizza Parlor
|
|
19
|
+
:city: Menlo Park
|
|
20
|
+
:state: CA
|
|
21
|
+
:country: US
|
|
22
|
+
:sets: []
|
|
23
|
+
1965/06/18:
|
|
24
|
+
:uuid: e7670295-e716-4f04-843c-e4411c82bda8
|
|
25
|
+
:venue: Frenchy's
|
|
26
|
+
:city: Hayward
|
|
27
|
+
:state: CA
|
|
28
|
+
:country: US
|
|
29
|
+
:sets: []
|
|
30
|
+
1965/08/01:
|
|
31
|
+
:uuid: bcac6971-1cd7-4ecd-a895-56b1eebe68f8
|
|
32
|
+
:venue: Cinnamon A
|
|
33
|
+
:city: Redwood City
|
|
34
|
+
:state: CA
|
|
35
|
+
:country: US
|
|
36
|
+
:sets: []
|
|
37
|
+
1965/09/01:
|
|
38
|
+
:uuid: 03db9d40-e739-4e9a-a304-54e090e67321
|
|
39
|
+
:venue: In Room
|
|
40
|
+
:city: Belmont
|
|
41
|
+
:state: CA
|
|
42
|
+
:country: US
|
|
43
|
+
:sets: []
|
|
44
|
+
1965/12/01:
|
|
45
|
+
:uuid: a00ae8ca-7a6e-4b76-87f9-0c03873996f9
|
|
46
|
+
:venue: Pierre's
|
|
47
|
+
:city: San Francisco
|
|
48
|
+
:state: CA
|
|
49
|
+
:country: US
|
|
50
|
+
:sets: []
|
|
51
|
+
1965/12/04:
|
|
52
|
+
:uuid: 39375335-6dc3-4b5b-8677-beaa752db89b
|
|
53
|
+
:venue: Big Nig's House
|
|
54
|
+
:city: San Jose
|
|
55
|
+
:state: CA
|
|
56
|
+
:country: US
|
|
57
|
+
:sets: []
|
|
58
|
+
1965/12/10:
|
|
59
|
+
:uuid: 4c35959a-06f1-417a-8e69-67c4e1df9417
|
|
60
|
+
:venue: Fillmore Auditorium
|
|
61
|
+
:city: San Francisco
|
|
62
|
+
:state: CA
|
|
63
|
+
:country: US
|
|
64
|
+
:sets: []
|
|
65
|
+
1965/12/11:
|
|
66
|
+
:uuid: 604da57f-3f8b-4e67-8bf6-1b4783d10e13
|
|
67
|
+
:venue: The Big Beat
|
|
68
|
+
:city: Palo Alto
|
|
69
|
+
:state: CA
|
|
70
|
+
:country: US
|
|
71
|
+
:sets: []
|
|
72
|
+
1965/12/18:
|
|
73
|
+
:uuid: 5618738d-6841-4c1e-a71a-1f18b5ab879b
|
|
74
|
+
:venue: Muir Beach Lodge
|
|
75
|
+
:city: Muir Beach
|
|
76
|
+
:state: CA
|
|
77
|
+
:country: US
|
|
78
|
+
:sets: []
|