herder 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.travis.yml +0 -4
- data/Gemfile.lock +4 -0
- data/README.md +1 -0
- data/herder.gemspec +1 -0
- data/lib/herder.rb +3 -0
- data/lib/herder/attendee.rb +2 -1
- data/lib/herder/email.rb +5 -0
- data/lib/herder/model.rb +1 -1
- data/lib/herder/ticket.rb +5 -0
- data/lib/herder/version.rb +1 -1
- data/spec/herder/attendee_spec.rb +5 -0
- data/spec/herder/email_spec.rb +16 -0
- data/spec/herder/ticket_spec.rb +16 -0
- metadata +28 -10
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
pkg
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -4,6 +4,7 @@ PATH
|
|
4
4
|
herder (0.0.1)
|
5
5
|
active_resource_pagination
|
6
6
|
activeresource
|
7
|
+
reactive_resource
|
7
8
|
will_paginate
|
8
9
|
|
9
10
|
GEM
|
@@ -24,6 +25,9 @@ GEM
|
|
24
25
|
i18n (0.6.0)
|
25
26
|
multi_json (1.3.6)
|
26
27
|
rake (0.9.2.2)
|
28
|
+
reactive_resource (0.7.0)
|
29
|
+
activeresource (>= 3.1)
|
30
|
+
activesupport (>= 3.1)
|
27
31
|
rspec (2.11.0)
|
28
32
|
rspec-core (~> 2.11.0)
|
29
33
|
rspec-expectations (~> 2.11.0)
|
data/README.md
CHANGED
data/herder.gemspec
CHANGED
data/lib/herder.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
require "active_resource"
|
2
|
+
require "reactive_resource"
|
2
3
|
require "active_resource_pagination"
|
3
4
|
|
4
5
|
require_relative "herder/config"
|
5
6
|
require_relative "herder/model"
|
6
7
|
require_relative "herder/attendee"
|
8
|
+
require_relative "herder/ticket"
|
9
|
+
require_relative "herder/email"
|
7
10
|
|
8
11
|
class Herder
|
9
12
|
end
|
data/lib/herder/attendee.rb
CHANGED
data/lib/herder/email.rb
ADDED
data/lib/herder/model.rb
CHANGED
data/lib/herder/version.rb
CHANGED
@@ -8,4 +8,9 @@ describe Herder::Attendee do
|
|
8
8
|
it "should inherit Herder::Model" do
|
9
9
|
Herder::Attendee.new.should be_a(Herder::Model)
|
10
10
|
end
|
11
|
+
|
12
|
+
it "should have many tickets and emails" do
|
13
|
+
Herder::Attendee.associations.map(&:attribute).should =~ [:tickets, :emails]
|
14
|
+
Herder::Attendee.associations.map(&:class).uniq.should be == [ReactiveResource::Association::HasManyAssociation]
|
15
|
+
end
|
11
16
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Herder::Email do
|
4
|
+
it "should setup right name" do
|
5
|
+
Herder::Email.element_name.should be == "email"
|
6
|
+
end
|
7
|
+
|
8
|
+
it "should inherit Herder::Model" do
|
9
|
+
Herder::Email.new.should be_a(Herder::Model)
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should belong to an attendee" do
|
13
|
+
Herder::Ticket.associations.map(&:attribute).should =~ [:attendee]
|
14
|
+
Herder::Ticket.associations.map(&:class).should be == [ReactiveResource::Association::BelongsToAssociation]
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Herder::Ticket do
|
4
|
+
it "should setup right name" do
|
5
|
+
Herder::Ticket.element_name.should be == "ticket"
|
6
|
+
end
|
7
|
+
|
8
|
+
it "should inherit Herder::Model" do
|
9
|
+
Herder::Ticket.new.should be_a(Herder::Model)
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should belong to an attendee" do
|
13
|
+
Herder::Ticket.associations.map(&:attribute).should =~ [:attendee]
|
14
|
+
Herder::Ticket.associations.map(&:class).should be == [ReactiveResource::Association::BelongsToAssociation]
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: herder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70333801744000 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70333801744000
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: activeresource
|
27
|
-
requirement: &
|
27
|
+
requirement: &70333801743580 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,21 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70333801743580
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: reactive_resource
|
38
|
+
requirement: &70333801743160 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :runtime
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70333801743160
|
36
47
|
- !ruby/object:Gem::Dependency
|
37
48
|
name: active_resource_pagination
|
38
|
-
requirement: &
|
49
|
+
requirement: &70333801742740 !ruby/object:Gem::Requirement
|
39
50
|
none: false
|
40
51
|
requirements:
|
41
52
|
- - ! '>='
|
@@ -43,10 +54,10 @@ dependencies:
|
|
43
54
|
version: '0'
|
44
55
|
type: :runtime
|
45
56
|
prerelease: false
|
46
|
-
version_requirements: *
|
57
|
+
version_requirements: *70333801742740
|
47
58
|
- !ruby/object:Gem::Dependency
|
48
59
|
name: will_paginate
|
49
|
-
requirement: &
|
60
|
+
requirement: &70333801742320 !ruby/object:Gem::Requirement
|
50
61
|
none: false
|
51
62
|
requirements:
|
52
63
|
- - ! '>='
|
@@ -54,7 +65,7 @@ dependencies:
|
|
54
65
|
version: '0'
|
55
66
|
type: :runtime
|
56
67
|
prerelease: false
|
57
|
-
version_requirements: *
|
68
|
+
version_requirements: *70333801742320
|
58
69
|
description: The herder that manages all animals talking to the hamster
|
59
70
|
email:
|
60
71
|
- cristiano@geeksoflondon.com
|
@@ -62,6 +73,7 @@ executables: []
|
|
62
73
|
extensions: []
|
63
74
|
extra_rdoc_files: []
|
64
75
|
files:
|
76
|
+
- .gitignore
|
65
77
|
- .rspec
|
66
78
|
- .rvmrc
|
67
79
|
- .travis.yml
|
@@ -74,11 +86,15 @@ files:
|
|
74
86
|
- lib/herder.rb
|
75
87
|
- lib/herder/attendee.rb
|
76
88
|
- lib/herder/config.rb
|
89
|
+
- lib/herder/email.rb
|
77
90
|
- lib/herder/model.rb
|
91
|
+
- lib/herder/ticket.rb
|
78
92
|
- lib/herder/version.rb
|
79
93
|
- spec/herder/attendee_spec.rb
|
80
94
|
- spec/herder/config_spec.rb
|
95
|
+
- spec/herder/email_spec.rb
|
81
96
|
- spec/herder/model_spec.rb
|
97
|
+
- spec/herder/ticket_spec.rb
|
82
98
|
- spec/herder_spec.rb
|
83
99
|
- spec/spec_helper.rb
|
84
100
|
homepage: http://github.com/geeksoflondon/herder
|
@@ -108,6 +124,8 @@ summary: The herder
|
|
108
124
|
test_files:
|
109
125
|
- spec/herder/attendee_spec.rb
|
110
126
|
- spec/herder/config_spec.rb
|
127
|
+
- spec/herder/email_spec.rb
|
111
128
|
- spec/herder/model_spec.rb
|
129
|
+
- spec/herder/ticket_spec.rb
|
112
130
|
- spec/herder_spec.rb
|
113
131
|
- spec/spec_helper.rb
|