happy 0.1.0.pre11 → 0.1.0.pre12
Sign up to get free protection for your applications and to get access to all the features.
- data/.watchr +4 -4
- data/happy.gemspec +1 -1
- data/lib/happy/controller/actions.rb +7 -0
- data/lib/happy/controller/rackable.rb +1 -4
- data/lib/happy/controller/routing.rb +1 -4
- data/lib/happy/controller.rb +4 -4
- data/lib/happy/request.rb +3 -0
- data/lib/happy/utils/app_spawner.rb +1 -0
- data/lib/happy/version.rb +1 -1
- data/lib/happy.rb +0 -2
- data/spec/happy_spec.rb +19 -0
- data/spec/spec_helper.rb +0 -1
- metadata +29 -27
- /data/spec/{controller_ext → controller}/actions_spec.rb +0 -0
- /data/spec/{controller_ext → controller}/routing_spec.rb +0 -0
data/.watchr
CHANGED
@@ -5,11 +5,11 @@ def run(cmd, msg = nil)
|
|
5
5
|
puts "\n"
|
6
6
|
end
|
7
7
|
|
8
|
-
watch("spec/.*_spec\.rb") { |m| run("
|
9
|
-
watch("lib/happy/(.*)\.rb") { |m| run("
|
10
|
-
watch('^spec/(spec_helper|factories)\.rb') { |f| run "
|
8
|
+
watch("spec/.*_spec\.rb") { |m| run("rspec %s" % m[0]) }
|
9
|
+
watch("lib/happy/(.*)\.rb") { |m| run("rspec spec/%s_spec.rb" % m[1]) }
|
10
|
+
watch('^spec/(spec_helper|factories)\.rb') { |f| run "rake spec", "%s.rb has been modified" % f }
|
11
11
|
|
12
12
|
# Ctrl-\
|
13
|
-
Signal.trap('QUIT') { run("
|
13
|
+
Signal.trap('QUIT') { run("rake spec") }
|
14
14
|
# Ctrl-C
|
15
15
|
Signal.trap('INT') { abort("\nQuitting.") }
|
data/happy.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
|
|
17
17
|
|
18
18
|
gem.add_dependency 'activesupport', '~> 3.1'
|
19
19
|
gem.add_dependency 'rack', '~> 1.4'
|
20
|
-
gem.add_dependency 'happy-helpers', '~> 0.1.0.
|
20
|
+
gem.add_dependency 'happy-helpers', '~> 0.1.0.pre9'
|
21
21
|
gem.add_dependency 'allowance', '>= 0.1.1'
|
22
22
|
|
23
23
|
gem.add_dependency 'happy-cli', '>= 0.1.0.pre1'
|
data/lib/happy/controller.rb
CHANGED
@@ -35,16 +35,16 @@ module Happy
|
|
35
35
|
|
36
36
|
protected
|
37
37
|
|
38
|
-
def url(extras = nil)
|
39
|
-
url_for(previous_path, extras)
|
40
|
-
end
|
41
|
-
|
42
38
|
def root_url(extras = nil)
|
43
39
|
url_for(root_path, extras)
|
44
40
|
end
|
45
41
|
|
46
42
|
private
|
47
43
|
|
44
|
+
def url(extras = nil)
|
45
|
+
url_for(previous_path, extras)
|
46
|
+
end
|
47
|
+
|
48
48
|
def context
|
49
49
|
@env['happy.context'] ||= self.class.context_class.from_env(@env)
|
50
50
|
end
|
data/lib/happy/request.rb
CHANGED
data/lib/happy/version.rb
CHANGED
data/lib/happy.rb
CHANGED
data/spec/happy_spec.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Happy do
|
4
|
+
describe '#env' do
|
5
|
+
it "is a StringInquirer instance describing the RACK environment" do
|
6
|
+
Happy.env.should be_kind_of(ActiveSupport::StringInquirer)
|
7
|
+
end
|
8
|
+
|
9
|
+
it "provides #development?, #production? etc." do
|
10
|
+
ENV.should_receive(:[]).twice.with('RACK_ENV').and_return('development')
|
11
|
+
Happy.env.should be_development
|
12
|
+
Happy.env.should_not be_production
|
13
|
+
|
14
|
+
ENV.should_receive(:[]).twice.with('RACK_ENV').and_return('production')
|
15
|
+
Happy.env.should be_production
|
16
|
+
Happy.env.should_not be_development
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: happy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.pre12
|
5
5
|
prerelease: 6
|
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-06-
|
12
|
+
date: 2012-06-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
16
|
-
requirement: &
|
16
|
+
requirement: &70295340567400 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '3.1'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70295340567400
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rack
|
27
|
-
requirement: &
|
27
|
+
requirement: &70295340555820 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,21 +32,21 @@ dependencies:
|
|
32
32
|
version: '1.4'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70295340555820
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: happy-helpers
|
38
|
-
requirement: &
|
38
|
+
requirement: &70295340539140 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 0.1.0.
|
43
|
+
version: 0.1.0.pre9
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70295340539140
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: allowance
|
49
|
-
requirement: &
|
49
|
+
requirement: &70295340535640 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 0.1.1
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70295340535640
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: happy-cli
|
60
|
-
requirement: &
|
60
|
+
requirement: &70295340526260 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 0.1.0.pre1
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70295340526260
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
|
-
requirement: &
|
71
|
+
requirement: &70295340518680 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70295340518680
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: rspec
|
82
|
-
requirement: &
|
82
|
+
requirement: &70295340505940 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '2.8'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70295340505940
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: rspec-html-matchers
|
93
|
-
requirement: &
|
93
|
+
requirement: &70295340498580 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70295340498580
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: rack-test
|
104
|
-
requirement: &
|
104
|
+
requirement: &70295340485280 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: '0'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70295340485280
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: watchr
|
115
|
-
requirement: &
|
115
|
+
requirement: &70295340465380 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,7 +120,7 @@ dependencies:
|
|
120
120
|
version: '0'
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *70295340465380
|
124
124
|
description: A happy little toolkit for writing web applications.
|
125
125
|
email:
|
126
126
|
- hendrik@mans.de
|
@@ -151,9 +151,10 @@ files:
|
|
151
151
|
- lib/happy/request.rb
|
152
152
|
- lib/happy/utils/app_spawner.rb
|
153
153
|
- lib/happy/version.rb
|
154
|
-
- spec/
|
155
|
-
- spec/
|
154
|
+
- spec/controller/actions_spec.rb
|
155
|
+
- spec/controller/routing_spec.rb
|
156
156
|
- spec/controller_spec.rb
|
157
|
+
- spec/happy_spec.rb
|
157
158
|
- spec/spec_helper.rb
|
158
159
|
homepage: https://github.com/hmans/happy
|
159
160
|
licenses: []
|
@@ -180,8 +181,9 @@ signing_key:
|
|
180
181
|
specification_version: 3
|
181
182
|
summary: A happy little toolkit for writing web applications.
|
182
183
|
test_files:
|
183
|
-
- spec/
|
184
|
-
- spec/
|
184
|
+
- spec/controller/actions_spec.rb
|
185
|
+
- spec/controller/routing_spec.rb
|
185
186
|
- spec/controller_spec.rb
|
187
|
+
- spec/happy_spec.rb
|
186
188
|
- spec/spec_helper.rb
|
187
189
|
has_rdoc:
|
File without changes
|
File without changes
|