calatrava 0.6.8 → 0.6.9

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -9,3 +9,4 @@ currencyConverter/*
9
9
  /.rake
10
10
  /.vagrant
11
11
  /.idea
12
+ Gemfile.lock
data/.gitmodules ADDED
@@ -0,0 +1,18 @@
1
+ [submodule "puppet/modules/rvm"]
2
+ path = puppet/modules/rvm
3
+ url = git://github.com/blt04/puppet-rvm.git
4
+ [submodule "puppet/modules/stdlib"]
5
+ path = puppet/modules/stdlib
6
+ url = git://github.com/puppetlabs/puppetlabs-stdlib.git
7
+ [submodule "puppet/modules/android"]
8
+ path = puppet/modules/android
9
+ url = git://github.com/maestrodev/puppet-android.git
10
+ [submodule "puppet/modules/wget"]
11
+ path = puppet/modules/wget
12
+ url = git://github.com/maestrodev/puppet-wget.git
13
+ [submodule "puppet/modules/java"]
14
+ path = puppet/modules/java
15
+ url = git://github.com/puppetlabs/puppetlabs-java.git
16
+ [submodule "puppet/modules/nodejs"]
17
+ path = puppet/modules/nodejs
18
+ url = git://github.com/willdurand/puppet-nodejs.git
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-1.9.3-p392
1
+ ruby-1.9.3-p448
data/CHANGES.markdown CHANGED
@@ -1,3 +1,15 @@
1
+ ## v0.6.9
2
+
3
+ Bugs Fixed:
4
+ * [Issue #58][i58]: Sass/Scss Partials shouldn't be compiled, and
5
+ sub-directories should be preserved
6
+ * [Issue #96][i96]: Android Plugin callback handle is overridden
7
+ on quick successive calls to plugin
8
+ * [Issue #94][i94]: Android Plugin callback errors out if returned
9
+ data is null
10
+ * [Issue #100][i100]: Avoid closing a null ProgressDialog object
11
+ * Handle the API changes in the latest versions of xcodeproj.
12
+
1
13
  ## v0.6.8
2
14
 
3
15
  New features:
@@ -200,3 +212,7 @@ Changes that will affect existing projects:
200
212
  [i87]: https://github.com/calatrava/calatrava/pull/87
201
213
  [i86]: https://github.com/calatrava/calatrava/pull/86
202
214
  [i84]: https://github.com/calatrava/calatrava/pull/84
215
+ [i58]: https://github.com/calatrava/calatrava/issues/58
216
+ [i96]: https://github.com/calatrava/calatrava/issues/96
217
+ [i94]: https://github.com/calatrava/calatrava/issues/94
218
+ [i100]: https://github.com/calatrava/calatrava/pull/100
data/Vagrantfile CHANGED
@@ -1,106 +1,21 @@
1
1
  # -*- mode: ruby -*-
2
2
  # vi: set ft=ruby :
3
3
 
4
- Vagrant.configure("2") do |config|
5
- config.vm.box = "quantal64"
6
-
7
- # The url from where the 'config.vm.box' box will be fetched if it
8
- # doesn't already exist on the user's system.
9
- config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/quantal/current/quantal-server-cloudimg-amd64-vagrant-disk1.box"
10
-
11
- # Create a forwarded port mapping which allows access to a specific port
12
- # within the machine from a port on the host machine. In the example below,
13
- # accessing "localhost:8080" will access port 80 on the guest machine.
14
- # config.vm.network :forwarded_port, guest: 80, host: 8080
15
-
16
- # Create a private network, which allows host-only access to the machine
17
- # using a specific IP.
18
- # config.vm.network :private_network, ip: "192.168.33.10"
19
-
20
- # Create a public network, which generally matched to bridged network.
21
- # Bridged networks make the machine appear as another physical device on
22
- # your network.
23
- # config.vm.network :public_network
24
-
25
- # Share an additional folder to the guest VM. The first argument is
26
- # the path on the host to the actual folder. The second argument is
27
- # the path on the guest to mount the folder. And the optional third
28
- # argument is a set of non-required options.
29
- # config.vm.synced_folder "../data", "/vagrant_data"
30
-
31
- # Provider-specific configuration so you can fine-tune various
32
- # backing providers for Vagrant. These expose provider-specific options.
33
- # Example for VirtualBox:
34
- #
35
- # config.vm.provider :virtualbox do |vb|
36
- # # Don't boot with headless mode
37
- # vb.gui = true
38
- #
39
- # # Use VBoxManage to customize the VM. For example to change memory:
40
- # vb.customize ["modifyvm", :id, "--memory", "1024"]
41
- # end
42
- #
43
- # View the documentation for the provider you're using for more
44
- # information on available options.
45
-
46
- # Enable provisioning with Puppet stand alone. Puppet manifests
47
- # are contained in a directory path relative to this Vagrantfile.
48
- # You will need to create the manifests directory and a manifest in
49
- # the file base.pp in the manifests_path directory.
50
- #
51
- # An example Puppet manifest to provision the message of the day:
52
- #
53
- # # group { "puppet":
54
- # # ensure => "present",
55
- # # }
56
- # #
57
- # # File { owner => 0, group => 0, mode => 0644 }
58
- # #
59
- # # file { '/etc/motd':
60
- # # content => "Welcome to your Vagrant-built virtual machine!
61
- # # Managed by Puppet.\n"
62
- # # }
63
- #
64
- # config.vm.provision :puppet do |puppet|
65
- # puppet.manifests_path = "manifests"
66
- # puppet.manifest_file = "init.pp"
67
- # end
68
-
69
- # Enable provisioning with chef solo, specifying a cookbooks path, roles
70
- # path, and data_bags path (all relative to this Vagrantfile), and adding
71
- # some recipes and/or roles.
72
- #
73
- # config.vm.provision :chef_solo do |chef|
74
- # chef.cookbooks_path = "../my-recipes/cookbooks"
75
- # chef.roles_path = "../my-recipes/roles"
76
- # chef.data_bags_path = "../my-recipes/data_bags"
77
- # chef.add_recipe "mysql"
78
- # chef.add_role "web"
79
- #
80
- # # You may also specify custom JSON attributes:
81
- # chef.json = { :mysql_password => "foo" }
82
- # end
83
-
84
- # Enable provisioning with chef server, specifying the chef server URL,
85
- # and the path to the validation key (relative to this Vagrantfile).
86
- #
87
- # The Opscode Platform uses HTTPS. Substitute your organization for
88
- # ORGNAME in the URL and validation key.
89
- #
90
- # If you have your own Chef Server, use the appropriate URL, which may be
91
- # HTTP instead of HTTPS depending on your configuration. Also change the
92
- # validation key to validation.pem.
93
- #
94
- # config.vm.provision :chef_client do |chef|
95
- # chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
96
- # chef.validation_key_path = "ORGNAME-validator.pem"
97
- # end
98
- #
99
- # If you're using the Opscode platform, your validator client is
100
- # ORGNAME-validator, replacing ORGNAME with your organization name.
101
- #
102
- # If you have your own Chef Server, the default validation client name is
103
- # chef-validator, unless you changed the configuration.
104
- #
105
- # chef.validation_client_name = "ORGNAME-validator"
4
+ Vagrant.configure('2') do |config|
5
+ config.vm.box = 'precise64-ubuntu-12.04LTS'
6
+ config.vm.box_url = 'http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-vagrant-amd64-disk1.box'
7
+
8
+ config.vm.provider :virtualbox do |vb|
9
+ vb.customize ['modifyvm', :id, '--natdnshostresolver1', 'on'] # Host OS's resolve. Includes /etc/hosts entries
10
+ vb.customize ['modifyvm', :id, '--memory', '1024']
11
+ end
12
+
13
+ config.vm.network :private_network, ip: '172.16.1.1'
14
+ config.vm.network :forwarded_port, guest: 8888, host: 8888
15
+
16
+ config.vm.provision :puppet do |puppet|
17
+ puppet.manifests_path = 'puppet/manifests'
18
+ puppet.module_path = 'puppet/modules'
19
+ puppet.manifest_file = 'init.pp'
20
+ end
106
21
  end
@@ -39,8 +39,12 @@ module Calatrava
39
39
  @shell.css_files
40
40
  end
41
41
 
42
- def css_tasks(output_dir)
42
+ def css_tasks(base_output_dir)
43
43
  css_files.collect do |style_file|
44
+ #drop shell/stylesheets in order to preserve sub-directories
45
+ sub_path = style_file.split("/")[2..-2].join("/")
46
+ output_dir = "#{base_output_dir}/#{sub_path}"
47
+ directory output_dir
44
48
  file "#{output_dir}/#{File.basename(style_file, '.*')}.css" => [output_dir, style_file] do |t|
45
49
  if style_file =~ /\.css$/
46
50
  cp style_file, output_dir
@@ -106,8 +106,8 @@ module Calatrava
106
106
  end
107
107
  end
108
108
 
109
- def create_ios_project
110
- Xcodeproj::Project.new
109
+ def create_ios_project(path)
110
+ Xcodeproj::Project.new(path)
111
111
  end
112
112
 
113
113
  def create_ios_project_groups(base_dir, proj, target)
@@ -182,14 +182,14 @@ module Calatrava
182
182
  end
183
183
 
184
184
  def create_ios_tree(template)
185
- proj = create_ios_project
186
185
  base_dir = Pathname.new(@name) + "ios"
186
+ proj = create_ios_project((base_dir + "#{@name}.xcodeproj").to_s)
187
187
 
188
188
  target = create_ios_project_target(proj)
189
189
  create_ios_project_groups(base_dir, proj, target)
190
190
  create_ios_folder_references(base_dir, proj, target)
191
191
 
192
- proj.save_as (base_dir + "#{@name}.xcodeproj").to_s
192
+ proj.save
193
193
  end
194
194
  end
195
195
 
@@ -20,7 +20,7 @@ module Calatrava
20
20
  def css_files
21
21
  Dir.chdir @path do
22
22
  ["sass", "scss", "css"].collect do |ext|
23
- Dir["shell/stylesheets/*.#{ext}"]
23
+ Dir["shell/stylesheets/**/[^_]*.#{ext}"]
24
24
  end.flatten
25
25
  end
26
26
  end
@@ -1 +1 @@
1
- ruby-1.9.3
1
+ ruby-1.9.3-p448
@@ -14,7 +14,6 @@ public class AlertPlugin implements RegisteredPlugin
14
14
  {
15
15
  private PluginRegistry registry;
16
16
  private Context ctxt;
17
- private String currentOkCallbackHandle;
18
17
 
19
18
  public void setContext(PluginRegistry registry, Context ctxt)
20
19
  {
@@ -24,6 +23,7 @@ public class AlertPlugin implements RegisteredPlugin
24
23
  @Override
25
24
  public void execute(Intent action, RegisteredActivity frontmost)
26
25
  {
26
+ final String currentOkCallbackHandle = action.getExtras().getString("okCallbackHandle");
27
27
  AlertDialog.Builder builder = new AlertDialog.Builder(frontmost);
28
28
  final boolean isConfirmDialog = action.getExtras().getString("method").equals("displayConfirm");
29
29
  builder.setMessage(action.getExtras().getString("message"))
@@ -53,9 +53,9 @@ public class AlertPlugin implements RegisteredPlugin
53
53
 
54
54
  public void call(String method, Map<String, Object> args)
55
55
  {
56
- currentOkCallbackHandle = (String)args.get("okHandler");
57
56
  ctxt.sendBroadcast(registry.pluginCommand("alert")
58
57
  .putExtra("method", method)
59
- .putExtra("message", (String)args.get("message")));
58
+ .putExtra("message", (String)args.get("message"))
59
+ .putExtra("okCallbackHandle", (String)args.get("okHandler")));
60
60
  }
61
61
  }
@@ -104,7 +104,8 @@ public class PluginRegistry {
104
104
 
105
105
  public void invokeCallback(String callbackHandle, Object data)
106
106
  {
107
- rhino.callJsFunction("calatrava.inbound.invokePluginCallback", new String[] {callbackHandle, data.toString()});
107
+ String callbackData = data == null ? null : data.toString();
108
+ rhino.callJsFunction("calatrava.inbound.invokePluginCallback", new String[] {callbackHandle, callbackData});
108
109
  }
109
110
 
110
111
  public void updateContext(Context activityContext)
@@ -1,9 +1,7 @@
1
1
  package com.calatrava.bridge;
2
2
 
3
3
  import android.app.Activity;
4
- import android.app.ActivityManager;
5
4
  import android.app.ProgressDialog;
6
- import android.content.Context;
7
5
  import android.util.Log;
8
6
 
9
7
  public class RequestLoader {
@@ -26,6 +24,6 @@ public class RequestLoader {
26
24
  }
27
25
 
28
26
  public void onLoadingFinish() {
29
- dialog.hide();
27
+ if(dialog != null) dialog.hide();
30
28
  }
31
29
  }
@@ -4,15 +4,9 @@
4
4
  , "private": true
5
5
  , "dependencies" : {
6
6
  "coffee-script" : "1.2.0"
7
- , "sinon" : "*"
8
- , "cucumber" : "latest"
9
- , "jsdom" : "latest"
10
- , "mime" : "latest"
7
+ , "sinon" : "1.7.3"
8
+ , "cucumber" : "0.3.1"
11
9
  , "jasmine-node" : "1.5.0"
12
- , "should" : "*"
13
- , "jasmine-reporters" : "*"
14
- , "walkdir" : "*"
15
- , "request" : "*"
16
- , "cssom" : "*"
10
+ , "should" : "1.2.2"
17
11
  }
18
12
  }
@@ -1,3 +1,3 @@
1
1
  module Calatrava
2
- Version = "0.6.8"
2
+ Version = "0.6.9"
3
3
  end
@@ -0,0 +1,49 @@
1
+
2
+ stage { 'req-install': before => Stage['rvm-install'] }
3
+
4
+ class requirements {
5
+ exec { "apt-update":
6
+ command => "/usr/bin/apt-get -y update"
7
+ }
8
+ include java
9
+ package { ["ant", "apache2"]:
10
+ ensure => installed,
11
+ require => Exec['apt-update']
12
+ }
13
+ }
14
+
15
+ class installrvm {
16
+ include rvm
17
+ rvm::system_user { vagrant: ; }
18
+
19
+ rvm_system_ruby {
20
+ 'ruby-1.9.3-p448':
21
+ ensure => 'present',
22
+ default_use => false;
23
+ }
24
+ }
25
+
26
+ class installandroid {
27
+ class {'android': user => 'vagrant'}
28
+
29
+ android::platform { 'android-17': }
30
+
31
+ file {"/home/vagrant/.bash_profile":
32
+ owner => vagrant,
33
+ group => vagrant,
34
+ mode => 0644,
35
+ content => template("/vagrant/puppet/templates/.bash_profile"),
36
+ require => Class['android'],
37
+ }
38
+ }
39
+
40
+ class doinstall {
41
+ class { requirements:
42
+ stage => "req-install"
43
+ }
44
+ include installrvm
45
+ include nodejs
46
+ include installandroid
47
+ }
48
+
49
+ include doinstall
@@ -0,0 +1,2 @@
1
+ export ANDROID_HOME=/usr/local/android/android-sdk-linux
2
+ export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calatrava
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.8
4
+ version: 0.6.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-21 00:00:00.000000000 Z
12
+ date: 2013-09-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -166,12 +166,12 @@ extensions:
166
166
  extra_rdoc_files: []
167
167
  files:
168
168
  - .gitignore
169
+ - .gitmodules
169
170
  - .ruby-gemset
170
171
  - .ruby-version
171
172
  - .travis.yml
172
173
  - CHANGES.markdown
173
174
  - Gemfile
174
- - Gemfile.lock
175
175
  - LICENSE.txt
176
176
  - README.md
177
177
  - Rakefile
@@ -302,6 +302,8 @@ files:
302
302
  - lib/calatrava/templates/web/app/views/index.haml
303
303
  - lib/calatrava/templates/web/manifest.yml
304
304
  - lib/calatrava/version.rb
305
+ - puppet/manifests/init.pp
306
+ - puppet/templates/.bash_profile
305
307
  - spec/app_builder_spec.rb
306
308
  - spec/kernel_spec.rb
307
309
  - spec/manifest_spec.rb
@@ -322,15 +324,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
322
324
  - - ! '>='
323
325
  - !ruby/object:Gem::Version
324
326
  version: '0'
327
+ segments:
328
+ - 0
329
+ hash: -3050607410502594598
325
330
  required_rubygems_version: !ruby/object:Gem::Requirement
326
331
  none: false
327
332
  requirements:
328
333
  - - ! '>='
329
334
  - !ruby/object:Gem::Version
330
335
  version: '0'
336
+ segments:
337
+ - 0
338
+ hash: -3050607410502594598
331
339
  requirements: []
332
340
  rubyforge_project: calatrava
333
- rubygems_version: 1.8.25
341
+ rubygems_version: 1.8.23
334
342
  signing_key:
335
343
  specification_version: 3
336
344
  summary: Cross-platform mobile apps with native UIs
data/Gemfile.lock DELETED
@@ -1,108 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- calatrava (0.6.6)
5
- cucumber (~> 1.2.1)
6
- haml (~> 3.1.7)
7
- mustache (~> 0.99.4)
8
- rake (>= 0.9.5)
9
- sass (~> 3.2.3)
10
- thor (~> 0.16.0)
11
- watir-webdriver (~> 0.6.1)
12
-
13
- GEM
14
- remote: https://rubygems.org/
15
- specs:
16
- activesupport (3.2.13)
17
- i18n (= 0.6.1)
18
- multi_json (~> 1.0)
19
- addressable (2.3.4)
20
- aruba (0.5.1)
21
- childprocess (~> 0.3.6)
22
- cucumber (>= 1.1.1)
23
- rspec-expectations (>= 2.7.0)
24
- builder (3.1.4)
25
- childprocess (0.3.6)
26
- ffi (~> 1.0, >= 1.0.6)
27
- claide (0.2.0)
28
- cocoapods (0.19.1)
29
- activesupport (~> 3.2.13)
30
- claide (~> 0.2.0)
31
- cocoapods-core (= 0.19.1)
32
- cocoapods-downloader (~> 0.1.0)
33
- colored (~> 1.2)
34
- escape (~> 0.0.4)
35
- faraday (~> 0.8.1)
36
- json (~> 1.7.3)
37
- octokit (~> 1.7)
38
- open4 (~> 1.3.0)
39
- rake (~> 10.0.0)
40
- xcodeproj (~> 0.5.5)
41
- cocoapods-core (0.19.1)
42
- activesupport (~> 3.2.13)
43
- rake (~> 10.0.0)
44
- cocoapods-downloader (0.1.0)
45
- colored (1.2)
46
- cucumber (1.2.1)
47
- builder (>= 2.1.2)
48
- diff-lcs (>= 1.1.3)
49
- gherkin (~> 2.11.0)
50
- json (>= 1.4.6)
51
- diff-lcs (1.1.3)
52
- escape (0.0.4)
53
- faraday (0.8.7)
54
- multipart-post (~> 1.1)
55
- faraday_middleware (0.9.0)
56
- faraday (>= 0.7.4, < 0.9)
57
- ffi (1.2.0)
58
- gherkin (2.11.5)
59
- json (>= 1.4.6)
60
- haml (3.1.8)
61
- hashie (2.0.5)
62
- i18n (0.6.1)
63
- json (1.7.5)
64
- multi_json (1.7.3)
65
- multipart-post (1.2.0)
66
- mustache (0.99.4)
67
- netrc (0.7.7)
68
- octokit (1.24.0)
69
- addressable (~> 2.2)
70
- faraday (~> 0.8)
71
- faraday_middleware (~> 0.9)
72
- hashie (~> 2.0)
73
- multi_json (~> 1.3)
74
- netrc (~> 0.7.7)
75
- open4 (1.3.0)
76
- rake (10.0.4)
77
- rspec (2.12.0)
78
- rspec-core (~> 2.12.0)
79
- rspec-expectations (~> 2.12.0)
80
- rspec-mocks (~> 2.12.0)
81
- rspec-core (2.12.0)
82
- rspec-expectations (2.12.0)
83
- diff-lcs (~> 1.1.3)
84
- rspec-mocks (2.12.0)
85
- rubyzip (0.9.9)
86
- sass (3.2.9)
87
- selenium-webdriver (2.32.1)
88
- childprocess (>= 0.2.5)
89
- multi_json (~> 1.0)
90
- rubyzip
91
- websocket (~> 1.0.4)
92
- thor (0.16.0)
93
- watir-webdriver (0.6.4)
94
- selenium-webdriver (>= 2.18.0)
95
- websocket (1.0.7)
96
- xcodeproj (0.5.5)
97
- activesupport (~> 3.2.13)
98
- colored (~> 1.2)
99
-
100
- PLATFORMS
101
- ruby
102
-
103
- DEPENDENCIES
104
- aruba
105
- calatrava!
106
- cocoapods
107
- rspec
108
- xcodeproj