calatrava 0.6.10 → 0.6.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.ruby-version +1 -1
- data/CHANGES.markdown +6 -0
- data/README.md +8 -0
- data/calatrava.gemspec +2 -2
- data/ext/mkrf_conf.rb +2 -2
- data/features/cli.feature +2 -1
- data/lib/calatrava/apache.rb +1 -0
- data/lib/calatrava/project_script.rb +1 -3
- data/lib/calatrava/templates/.ruby-version +1 -1
- data/lib/calatrava/templates/config/templates/httpd.conf.erb +18 -0
- data/lib/calatrava/templates/droid/calatrava/src/com/calatrava/shell/WebViewActivity.java +9 -8
- data/lib/calatrava/templates/kernel/app/converter/controller.converter.coffee +2 -0
- data/lib/calatrava/templates/kernel/spec/converter/controller.converter.spec.coffee +7 -0
- data/lib/calatrava/version.rb +1 -1
- data/spec/app_builder_spec.rb +9 -9
- data/spec/kernel_spec.rb +14 -10
- data/spec/manifest_spec.rb +17 -17
- data/spec/mobile_web_app_spec.rb +11 -11
- data/spec/output_file_spec.rb +11 -7
- data/spec/shell_spec.rb +10 -8
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
ZDRlNjk1ZWZiMjhmOWRhNjk4ZDQ3NWE5YTFhMzE4MmE0ZGJmMDVmMw==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 56e9745df7d8fbfacadc54a0a9bdade6d19abf83
|
4
|
+
data.tar.gz: 36bbe5bfe77eb2090155960d75edc5827dd771ca
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
Y2VhMGFlMDBhOWZmYjhjZTFkN2IyMWI1MzQ2ZDQwYWJmYTUyNzY3Y2IyZmU3
|
11
|
-
MDRkZjM2ZWQ3ZGI1YzE2NjM3OTEyMjcxNTdmYWE0ODBlYTE1YjI=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ODdiZmI1YjIzZDBiNmRkZTg3OGQwMTIxZWJmOTg0NTFiYjQ0MWJhZWIyNGM0
|
14
|
-
M2FjODdlMmI5MzkyZGE0Mjg2YmNjZDg5YjgwMzA0NzFjY2I5OWY0MjU3NDk3
|
15
|
-
ZTA1YzI5MGI3OGM4ODYyY2ZkZWVhNDhlMGE0Zjc1OWVhNjA4MDg=
|
6
|
+
metadata.gz: 9ddbabcba23d6120c42e2d2ffd9d731a2c61d49559b9d50c6e0eb0c1c1e2b22f593de565a54e411e1b58f28697cca044aa3805057e2ee129100d75865669f09e
|
7
|
+
data.tar.gz: 47f04f2d11f20aaf01c644f182e8b049913cbe3d4a1fb8197060d042aea26d22e982b740a05bf80455b468c75256f72ed7a350c17e75a67b622326e7fea93d72
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-
|
1
|
+
ruby-2.0.0
|
data/CHANGES.markdown
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## v0.6.11
|
2
|
+
|
3
|
+
Bugs Fixed:
|
4
|
+
* [Issue #106][i106]: Stability fixes
|
5
|
+
|
1
6
|
## v0.6.10
|
2
7
|
|
3
8
|
Bugs Fixed:
|
@@ -225,3 +230,4 @@ Changes that will affect existing projects:
|
|
225
230
|
[i100]: https://github.com/calatrava/calatrava/pull/100
|
226
231
|
[i103]: https://github.com/calatrava/calatrava/pull/103
|
227
232
|
[i104]: https://github.com/calatrava/calatrava/pull/104
|
233
|
+
[i106]: https://github.com/calatrava/calatrava/pull/106
|
data/README.md
CHANGED
@@ -36,6 +36,11 @@ need to be installed beforehand.
|
|
36
36
|
5. [Node.js](http://nodejs.org/). Only used to run tests, not part of
|
37
37
|
any production code. Again, if you're on a Mac I recommend
|
38
38
|
installing using homebrew.
|
39
|
+
|
40
|
+
6. [ant](http://ant.apache.org/). Up until Mac OS X 10.9 Mavericks this
|
41
|
+
was included. However, it has now been removed. It can be [installed with
|
42
|
+
homebrew](http://superuser.com/questions/610157/how-do-i-install-ant-on-os-x-mavericks),
|
43
|
+
however. Only required for Droid projects.
|
39
44
|
|
40
45
|
## Linux
|
41
46
|
|
@@ -68,6 +73,9 @@ Here are the dependencies for Linux:
|
|
68
73
|
following command: `sudo apt-get install apache2` (from
|
69
74
|
[this page](https://help.ubuntu.com/10.04/serverguide/httpd.html))
|
70
75
|
|
76
|
+
7. [ant](http://ant.apache.org/). You'll probably pick this up when you
|
77
|
+
install the Android tools. Only required for Droid projects.
|
78
|
+
|
71
79
|
# Getting Started
|
72
80
|
|
73
81
|
Once you have the dependenices installed, there are just six simple
|
data/calatrava.gemspec
CHANGED
@@ -23,11 +23,11 @@ Gem::Specification.new do |s|
|
|
23
23
|
|
24
24
|
s.add_runtime_dependency "rake", ">= 0.9.5"
|
25
25
|
|
26
|
-
s.add_runtime_dependency "thor", "
|
26
|
+
s.add_runtime_dependency "thor", ">= 0.16.0"
|
27
27
|
s.add_runtime_dependency "haml", "~> 3.1.7"
|
28
28
|
s.add_runtime_dependency "sass", "~> 3.2.3"
|
29
29
|
s.add_runtime_dependency "mustache", "~> 0.99.4"
|
30
|
-
s.add_runtime_dependency "cucumber", "~> 1.
|
30
|
+
s.add_runtime_dependency "cucumber", "~> 1.3.19"
|
31
31
|
s.add_runtime_dependency "watir-webdriver", "~> 0.6.1"
|
32
32
|
|
33
33
|
s.extensions = ["ext/mkrf_conf.rb"]
|
data/ext/mkrf_conf.rb
CHANGED
@@ -13,8 +13,8 @@ begin
|
|
13
13
|
# I don't *think* you can use Calatrava.platform == :mac here as it seems
|
14
14
|
# RubyGems builds Ruby extensions without the dependencies declared in the gemspec.
|
15
15
|
if RUBY_PLATFORM =~ /darwin/
|
16
|
-
installer.install "xcodeproj", ">= 0.
|
17
|
-
installer.install "cocoapods", ">= 0.
|
16
|
+
installer.install "xcodeproj", ">= 0.11.0"
|
17
|
+
installer.install "cocoapods", ">= 0.25.0"
|
18
18
|
end
|
19
19
|
|
20
20
|
rescue Exception => ex
|
data/features/cli.feature
CHANGED
@@ -6,7 +6,8 @@ Feature: Command line interface
|
|
6
6
|
|
7
7
|
Scenario: Command-line validations
|
8
8
|
When I run `calatrava create`
|
9
|
-
Then the output should contain "
|
9
|
+
Then the output should contain "was called with no arguments"
|
10
|
+
And the output should contain "calatrava create <project-name>"
|
10
11
|
When I run `calatrava create project --template nonexistentdirectory`
|
11
12
|
Then the output should contain "template must exist"
|
12
13
|
Given an empty file named "alt-template-file"
|
data/lib/calatrava/apache.rb
CHANGED
@@ -4,6 +4,7 @@ module Calatrava
|
|
4
4
|
include Rake::DSL
|
5
5
|
|
6
6
|
Calatrava::Configuration.extra do |c|
|
7
|
+
c.runtime :apache_2_dot_2, system('httpd -v | grep Apache/2.2 >> /dev/null')
|
7
8
|
if `uname -a`.chomp["amzn1"]
|
8
9
|
c.runtime :modules_path, "/usr/lib64/httpd/modules"
|
9
10
|
c.runtime :load_log_module, true
|
@@ -145,10 +145,8 @@ module Calatrava
|
|
145
145
|
target.build_configurations.each do |config|
|
146
146
|
config.build_settings.merge!({
|
147
147
|
"GCC_PREFIX_HEADER" => "src/#{@name}-Prefix.pch",
|
148
|
-
"OTHER_LDFLAGS" => ['-ObjC', '-all_load'],
|
149
148
|
"INFOPLIST_FILE" => "src/#{@name}-Info.plist",
|
150
|
-
"SKIP_INSTALL" => "NO"
|
151
|
-
"IPHONEOS_DEPLOYMENT_TARGET" => "5.0",
|
149
|
+
"SKIP_INSTALL" => "NO"
|
152
150
|
})
|
153
151
|
config.build_settings.delete "DSTROOT"
|
154
152
|
config.build_settings.delete "INSTALL_PATH"
|
@@ -1 +1 @@
|
|
1
|
-
ruby-
|
1
|
+
ruby-2.0.0
|
@@ -8,6 +8,11 @@ LoadModule log_config_module <%=configuration[:modules_path]%>/mod_log_config.so
|
|
8
8
|
LoadModule mime_module <%=configuration[:modules_path]%>/mod_mime.so
|
9
9
|
LoadModule dir_module <%=configuration[:modules_path]%>/mod_dir.so
|
10
10
|
LoadModule alias_module <%=configuration[:modules_path]%>/mod_alias.so
|
11
|
+
<% unless configuration[:apache_2_dot_2] %>
|
12
|
+
LoadModule filter_module <%=configuration[:modules_path]%>/mod_filter.so
|
13
|
+
LoadModule unixd_module <%=configuration[:modules_path]%>/mod_unixd.so
|
14
|
+
LoadModule authz_core_module <%=configuration[:modules_path]%>/mod_authz_core.so
|
15
|
+
<% end %>
|
11
16
|
|
12
17
|
ErrorLog "logs/error.log"
|
13
18
|
LogLevel Debug
|
@@ -16,7 +21,13 @@ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"" combined
|
|
16
21
|
CustomLog "logs/access.log" combined
|
17
22
|
|
18
23
|
PidFile logs/httpd.pid
|
24
|
+
|
25
|
+
<% if configuration[:apache_2_dot_2] %>
|
19
26
|
LockFile logs/run.lock
|
27
|
+
<% else %>
|
28
|
+
Mutex default:/tmp
|
29
|
+
<% end %>
|
30
|
+
|
20
31
|
|
21
32
|
TypesConfig conf/mime.types
|
22
33
|
|
@@ -26,6 +37,13 @@ ProxyRequests off
|
|
26
37
|
|
27
38
|
ProxyPass /currency <%= configuration['api_endpoint'] %>/currency
|
28
39
|
|
40
|
+
<% unless configuration[:apache_2_dot_2] %>
|
41
|
+
<Directory />
|
42
|
+
Require all granted
|
43
|
+
</Directory>
|
44
|
+
<% end %>
|
45
|
+
|
46
|
+
|
29
47
|
SSLProxyEngine On
|
30
48
|
|
31
49
|
DocumentRoot "public"
|
@@ -15,8 +15,7 @@ import com.calatrava.bridge.RhinoService;
|
|
15
15
|
import java.util.HashMap;
|
16
16
|
import java.util.List;
|
17
17
|
import java.util.Map;
|
18
|
-
import java.util.concurrent.
|
19
|
-
import java.util.concurrent.FutureTask;
|
18
|
+
import java.util.concurrent.CountDownLatch;
|
20
19
|
import java.util.concurrent.Semaphore;
|
21
20
|
|
22
21
|
public abstract class WebViewActivity extends RegisteredActivity {
|
@@ -72,18 +71,20 @@ public abstract class WebViewActivity extends RegisteredActivity {
|
|
72
71
|
|
73
72
|
Log.d(TAG, "Get value for field: " + field + " on page '" + getPageName() + "'");
|
74
73
|
|
75
|
-
|
76
|
-
|
74
|
+
final CountDownLatch countDownLatch = new CountDownLatch(1);
|
75
|
+
|
76
|
+
runOnUiThread(new Runnable() {
|
77
|
+
@Override
|
78
|
+
public void run() {
|
77
79
|
webView.loadUrl("javascript:container.provideValueFor('" + field + "', window." + getPageName() + "View.get('" + field + "'));");
|
78
|
-
|
80
|
+
countDownLatch.countDown();
|
79
81
|
}
|
80
82
|
});
|
81
83
|
|
82
|
-
runOnUiThread(fieldValue);
|
83
|
-
|
84
84
|
String value;
|
85
85
|
try {
|
86
|
-
|
86
|
+
countDownLatch.await();
|
87
|
+
value = jsContainer.retrieveValueFor(field);
|
87
88
|
} catch (Exception e) {
|
88
89
|
e.printStackTrace();
|
89
90
|
// TODO: Signal failure to the UI thread
|
@@ -25,6 +25,8 @@ example.converter.controller = ({views, changePage, repository}) ->
|
|
25
25
|
ifSucceeded: (rate) ->
|
26
26
|
views.conversionForm.render
|
27
27
|
out_amount: (Math.round(amount * rate * 100)) / 100
|
28
|
+
elseFailed: (status) ->
|
29
|
+
calatrava.alert "Currency conversation API failed (#{status})"
|
28
30
|
|
29
31
|
convert = () ->
|
30
32
|
views.conversionForm.get 'in_amount', (inAmount) ->
|
@@ -58,3 +58,10 @@ describe 'converter controller', ->
|
|
58
58
|
expect(@views.conversionForm.lastMessage()).toEqual
|
59
59
|
out_amount: 0.96
|
60
60
|
|
61
|
+
it 'should show alert message if conversion fails', ->
|
62
|
+
calatrava.alert = jasmine.createSpy("alert dialog")
|
63
|
+
@views.conversionForm.fieldContains 'in_amount', 1
|
64
|
+
@views.conversionForm.trigger 'convert'
|
65
|
+
@exchangeRateRepository.mostRecentCall.args[0].elseFailed(500)
|
66
|
+
|
67
|
+
expect(calatrava.alert).toHaveBeenCalled()
|
data/lib/calatrava/version.rb
CHANGED
data/spec/app_builder_spec.rb
CHANGED
@@ -7,7 +7,7 @@ describe Calatrava::AppBuilder do
|
|
7
7
|
create_dir 'app'
|
8
8
|
|
9
9
|
proj = double('current project', :config => double('cfg', :path => 'env.coffee'))
|
10
|
-
Calatrava::Project.
|
10
|
+
allow(Calatrava::Project).to receive(:current).and_return(proj)
|
11
11
|
end
|
12
12
|
|
13
13
|
let(:manifest) { double('web mf',
|
@@ -21,29 +21,29 @@ describe Calatrava::AppBuilder do
|
|
21
21
|
context '#coffee_files' do
|
22
22
|
subject { app.coffee_files.collect { |cf| cf.source_file.to_s } }
|
23
23
|
|
24
|
-
it {
|
25
|
-
it {
|
26
|
-
it {
|
24
|
+
it { is_expected.to include 'path/to/kernel.coffee' }
|
25
|
+
it { is_expected.to include 'diff/path/shell.coffee' }
|
26
|
+
it { is_expected.to include 'env.coffee' }
|
27
27
|
end
|
28
28
|
|
29
29
|
context '#js_file' do
|
30
30
|
subject { app.js_file('path/to/sample.coffee') }
|
31
31
|
|
32
|
-
it {
|
32
|
+
it { is_expected.to eq('app/build/scripts/sample.js') }
|
33
33
|
end
|
34
34
|
|
35
35
|
context '#load_file' do
|
36
36
|
subject { app.load_instructions.lines.to_a.each(&:chomp!) }
|
37
37
|
|
38
|
-
it {
|
39
|
-
it {
|
40
|
-
it {
|
38
|
+
it { is_expected.to include 'build/scripts/kernel.js' }
|
39
|
+
it { is_expected.to include 'build/scripts/kernel_lib.js' }
|
40
|
+
it { is_expected.not_to include 'build/scripts/shell.js' }
|
41
41
|
end
|
42
42
|
|
43
43
|
context '#haml_files' do
|
44
44
|
subject { app.haml_files }
|
45
45
|
|
46
|
-
it {
|
46
|
+
it { is_expected.to include 'diff/path/shell.haml' }
|
47
47
|
end
|
48
48
|
|
49
49
|
end
|
data/spec/kernel_spec.rb
CHANGED
@@ -21,31 +21,35 @@ describe Calatrava::Kernel do
|
|
21
21
|
context '#features' do
|
22
22
|
subject { kernel.features }
|
23
23
|
|
24
|
-
it
|
24
|
+
it 'has 1 feature' do
|
25
|
+
expect(subject.size).to eq(1)
|
26
|
+
end
|
25
27
|
|
26
28
|
context 'a single feature' do
|
27
29
|
subject { kernel.features[0] }
|
28
30
|
|
29
|
-
it {
|
30
|
-
it {
|
31
|
+
it { is_expected.to include :name => 'mod1' }
|
32
|
+
it { is_expected.to include :coffee => ['kernel/app/mod1/first.coffee'] }
|
31
33
|
end
|
32
34
|
end
|
33
35
|
|
34
36
|
context '#coffee_files' do
|
35
37
|
subject { kernel.coffee_files }
|
36
38
|
|
37
|
-
it
|
38
|
-
|
39
|
-
|
40
|
-
it {
|
39
|
+
it 'has 3 files' do
|
40
|
+
expect(subject.size).to eq(3)
|
41
|
+
end
|
42
|
+
it { is_expected.to include 'kernel/app/support.coffee' }
|
43
|
+
it { is_expected.to include 'kernel/plugins/plugin.one.coffee' }
|
44
|
+
it { is_expected.to include 'kernel/plugins/two.coffee' }
|
41
45
|
end
|
42
46
|
|
43
47
|
context '#coffee_path' do
|
44
48
|
subject { kernel.coffee_path }
|
45
49
|
|
46
|
-
it {
|
47
|
-
it {
|
48
|
-
it {
|
50
|
+
it { is_expected.to include 'app:' }
|
51
|
+
it { is_expected.to include 'app/mod1' }
|
52
|
+
it { is_expected.to include 'app/plugins' }
|
49
53
|
end
|
50
54
|
|
51
55
|
end
|
data/spec/manifest_spec.rb
CHANGED
@@ -25,45 +25,45 @@ describe Calatrava::Manifest do
|
|
25
25
|
context 'coffee files' do
|
26
26
|
subject { manifest.coffee_files }
|
27
27
|
|
28
|
-
it {
|
29
|
-
it {
|
28
|
+
it { is_expected.to include 'kernel_everywhere' }
|
29
|
+
it { is_expected.to include 'shell_everywhere' }
|
30
30
|
|
31
|
-
it {
|
32
|
-
it {
|
33
|
-
it {
|
34
|
-
it {
|
31
|
+
it { is_expected.to include 'k_inc' }
|
32
|
+
it { is_expected.not_to include 'k_exc' }
|
33
|
+
it { is_expected.to include 'shell_inc' }
|
34
|
+
it { is_expected.not_to include 'shell_exc' }
|
35
35
|
end
|
36
36
|
|
37
37
|
context 'haml files' do
|
38
38
|
subject { manifest.haml_files }
|
39
39
|
|
40
|
-
it {
|
41
|
-
it {
|
42
|
-
it {
|
40
|
+
it { is_expected.to include 'fragment' }
|
41
|
+
it { is_expected.to include 'inc' }
|
42
|
+
it { is_expected.not_to include 'exc' }
|
43
43
|
end
|
44
44
|
|
45
45
|
context '#css_files' do
|
46
46
|
subject { manifest.css_files }
|
47
47
|
|
48
|
-
it {
|
48
|
+
it { is_expected.to include 'styles' }
|
49
49
|
end
|
50
50
|
|
51
51
|
context '#kernel_bootstrap' do
|
52
52
|
subject { manifest.kernel_bootstrap }
|
53
53
|
|
54
|
-
it {
|
55
|
-
it {
|
54
|
+
it { is_expected.to include 'k_inc' }
|
55
|
+
it { is_expected.to include 'kernel_everywhere' }
|
56
56
|
|
57
|
-
it {
|
58
|
-
it {
|
59
|
-
it {
|
57
|
+
it { is_expected.not_to include 'k_exc' }
|
58
|
+
it { is_expected.not_to include 'shell_everywhere' }
|
59
|
+
it { is_expected.not_to include 'shell_inc' }
|
60
60
|
end
|
61
61
|
|
62
62
|
context '#kernel_libraries' do
|
63
63
|
context "#when present" do
|
64
64
|
subject { manifest.kernel_libraries }
|
65
65
|
|
66
|
-
it {
|
66
|
+
it { is_expected.to include 'kernel_lib.js'}
|
67
67
|
end
|
68
68
|
|
69
69
|
context "#when not present" do
|
@@ -73,7 +73,7 @@ describe Calatrava::Manifest do
|
|
73
73
|
|
74
74
|
subject { manifest.kernel_libraries }
|
75
75
|
|
76
|
-
it {
|
76
|
+
it { is_expected.to be_empty}
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
data/spec/mobile_web_app_spec.rb
CHANGED
@@ -9,7 +9,7 @@ describe Calatrava::MobileWebApp do
|
|
9
9
|
write_file 'web/app/source/support.coffee', ''
|
10
10
|
|
11
11
|
proj = double('current project', :config => double('cfg', :path => 'env.coffee'))
|
12
|
-
Calatrava::Project.
|
12
|
+
allow(Calatrava::Project).to receive(:current).and_return(proj)
|
13
13
|
end
|
14
14
|
|
15
15
|
let(:manifest) { double('web mf',
|
@@ -19,31 +19,31 @@ describe Calatrava::MobileWebApp do
|
|
19
19
|
let(:mobile_web) { Calatrava::MobileWebApp.new(current_dir, manifest) }
|
20
20
|
|
21
21
|
it 'should define the correct output directories' do
|
22
|
-
mobile_web.build_dir.
|
23
|
-
mobile_web.scripts_build_dir.
|
22
|
+
expect(mobile_web.build_dir).to match %r{web/public$}
|
23
|
+
expect(mobile_web.scripts_build_dir).to match %r{web/public/scripts$}
|
24
24
|
end
|
25
25
|
|
26
26
|
context '#coffee_files' do
|
27
27
|
subject { mobile_web.coffee_files.collect { |cf| cf.source_file.to_s } }
|
28
28
|
|
29
|
-
it {
|
30
|
-
it {
|
31
|
-
it {
|
32
|
-
it {
|
29
|
+
it { is_expected.to include 'path/to/kernel.coffee' }
|
30
|
+
it { is_expected.to include 'diff/path/shell.coffee' }
|
31
|
+
it { is_expected.to include 'web/app/source/support.coffee' }
|
32
|
+
it { is_expected.to include 'env.coffee' }
|
33
33
|
end
|
34
34
|
|
35
35
|
context '#scripts' do
|
36
36
|
subject { mobile_web.scripts }
|
37
37
|
|
38
|
-
it {
|
39
|
-
it {
|
40
|
-
it {
|
38
|
+
it { is_expected.to include 'scripts/kernel.js' }
|
39
|
+
it { is_expected.to include 'scripts/shell.js' }
|
40
|
+
it { is_expected.to include 'scripts/support.js' }
|
41
41
|
end
|
42
42
|
|
43
43
|
context '#haml_files' do
|
44
44
|
subject { mobile_web.haml_files }
|
45
45
|
|
46
|
-
it {
|
46
|
+
it { is_expected.to include 'diff/path/shell.haml' }
|
47
47
|
end
|
48
48
|
|
49
49
|
end
|
data/spec/output_file_spec.rb
CHANGED
@@ -10,22 +10,26 @@ describe Calatrava::OutputFile do
|
|
10
10
|
describe '#output_path' do
|
11
11
|
subject { file.output_path }
|
12
12
|
|
13
|
-
it {
|
14
|
-
it {
|
13
|
+
it { is_expected.to start_with("output directory/") }
|
14
|
+
it { is_expected.to end_with("coffee file.js") }
|
15
15
|
end
|
16
16
|
|
17
17
|
describe '#dependencies' do
|
18
18
|
subject { file.dependencies }
|
19
19
|
|
20
|
-
it
|
21
|
-
|
22
|
-
|
20
|
+
it 'has 2 dependencies' do
|
21
|
+
expect(subject.size).to eq(2)
|
22
|
+
end
|
23
|
+
it { is_expected.to include('coffee file.coffee') }
|
24
|
+
it { is_expected.to include('output directory') }
|
23
25
|
|
24
26
|
context 'with additional' do
|
25
27
|
let(:dependencies) { [:environment] }
|
26
28
|
|
27
|
-
it
|
28
|
-
|
29
|
+
it 'has 3 dependencies' do
|
30
|
+
expect(subject.size).to eq(3)
|
31
|
+
end
|
32
|
+
it { is_expected.to include(:environment) }
|
29
33
|
end
|
30
34
|
end
|
31
35
|
end
|
data/spec/shell_spec.rb
CHANGED
@@ -21,33 +21,35 @@ describe Calatrava::Shell do
|
|
21
21
|
context 'coffee files' do
|
22
22
|
subject { shell.coffee_files }
|
23
23
|
|
24
|
-
it {
|
24
|
+
it { is_expected.to include 'shell/support/shell.coffee' }
|
25
25
|
end
|
26
26
|
|
27
27
|
context 'haml files' do
|
28
28
|
subject { shell.haml_files }
|
29
29
|
|
30
|
-
it {
|
30
|
+
it { is_expected.to include 'shell/support/fragment.haml' }
|
31
31
|
end
|
32
32
|
|
33
33
|
context 'css files' do
|
34
34
|
subject { shell.css_files }
|
35
35
|
|
36
|
-
it {
|
37
|
-
it {
|
36
|
+
it { is_expected.to include 'shell/stylesheets/shell.css' }
|
37
|
+
it { is_expected.to include 'shell/stylesheets/template.sass' }
|
38
38
|
end
|
39
39
|
|
40
40
|
context 'features' do
|
41
41
|
subject { shell.features }
|
42
42
|
|
43
|
-
it
|
43
|
+
it 'has 1 feature' do
|
44
|
+
expect(subject.size).to eq(1)
|
45
|
+
end
|
44
46
|
|
45
47
|
context 'a single feature' do
|
46
48
|
subject { shell.features[0] }
|
47
49
|
|
48
|
-
it {
|
49
|
-
it {
|
50
|
-
it {
|
50
|
+
it { is_expected.to include :name => 'example' }
|
51
|
+
it { is_expected.to include :coffee => ['shell/pages/example/page.coffee'] }
|
52
|
+
it { is_expected.to include :haml => ['shell/pages/example/page.haml'] }
|
51
53
|
end
|
52
54
|
end
|
53
55
|
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calatrava
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Giles Alexander
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
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
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: aruba
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 0.9.5
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.9.5
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: thor
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 0.16.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.16.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.
|
117
|
+
version: 1.3.19
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - ~>
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 1.
|
124
|
+
version: 1.3.19
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: watir-webdriver
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -302,17 +302,17 @@ require_paths:
|
|
302
302
|
- lib
|
303
303
|
required_ruby_version: !ruby/object:Gem::Requirement
|
304
304
|
requirements:
|
305
|
-
- -
|
305
|
+
- - '>='
|
306
306
|
- !ruby/object:Gem::Version
|
307
307
|
version: '0'
|
308
308
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
309
309
|
requirements:
|
310
|
-
- -
|
310
|
+
- - '>='
|
311
311
|
- !ruby/object:Gem::Version
|
312
312
|
version: '0'
|
313
313
|
requirements: []
|
314
314
|
rubyforge_project: calatrava
|
315
|
-
rubygems_version: 2.
|
315
|
+
rubygems_version: 2.4.5
|
316
316
|
signing_key:
|
317
317
|
specification_version: 4
|
318
318
|
summary: Cross-platform mobile apps with native UIs
|