high_five 0.3.12 → 0.3.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e717e3ca8620ee1a2afe2916de2c8ca47ca01f71
4
- data.tar.gz: 075c12499c27c05326aad891f90e8b79df950bb9
3
+ metadata.gz: 11880f58bb558fd9d63c7b7889c8be0eaf998a7d
4
+ data.tar.gz: 6b56b204891ec2f281db61db2ab60eccbb746655
5
5
  SHA512:
6
- metadata.gz: aebc61c694e61cb5e0d09f239b60901db2ceb98c5f6c97413d25a19466a6b50266f04dde818d593e99052b782654d3c06ec9b7c2a72649518a286c4c354f17fe
7
- data.tar.gz: b510fd081ca5f8f0fead43f6afb8d16533b7a073caa1e37ff3124362ec73f74a9443473a014c4a3d14f73de64eabccb16058f4001f765958b6d7a13432ea6517
6
+ metadata.gz: 4e4a48aa33e8f98b8e1e48c87adffef7a2a6abd736b04eb366a743101313d5b359c68c5baeeefd8d11ab9c57373402b0a7621da4027058e0c2e6383056098cef
7
+ data.tar.gz: 90426b1667821561970d79fef4f1286e5953a617313600b8b43215b4af3ba28e4385fc795e20a6b910f98f6b69753a032ee5a4b5d633a405a932d09cedab9b45
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- high_five (0.3.5)
4
+ high_five (0.3.12)
5
5
  chunky_png
6
6
  coffee-script (~> 2.2.0)
7
7
  compass (~> 0.12.2)
@@ -17,12 +17,12 @@ PATH
17
17
  GEM
18
18
  remote: https://rubygems.org/
19
19
  specs:
20
- chunky_png (1.3.4)
20
+ chunky_png (1.3.5)
21
21
  coderay (1.1.0)
22
22
  coffee-script (2.2.0)
23
23
  coffee-script-source
24
24
  execjs
25
- coffee-script-source (1.9.1.1)
25
+ coffee-script-source (1.10.0)
26
26
  compass (0.12.7)
27
27
  chunky_png (~> 1.2)
28
28
  fssm (>= 0.2.7)
@@ -32,10 +32,10 @@ GEM
32
32
  fssm (0.2.10)
33
33
  hike (1.2.3)
34
34
  method_source (0.8.2)
35
- mini_portile (0.6.2)
35
+ mini_portile2 (2.0.0)
36
36
  multi_json (1.11.2)
37
- nokogiri (1.6.6.2)
38
- mini_portile (~> 0.6.0)
37
+ nokogiri (1.6.7.1)
38
+ mini_portile2 (~> 2.0.0.rc2)
39
39
  plist (3.1.0)
40
40
  pry (0.10.1)
41
41
  coderay (~> 1.1.0)
data/README.md CHANGED
@@ -1,36 +1,270 @@
1
- High Five
2
- =========
1
+ # High Five
3
2
 
4
- HTML5 build/deploy tool, usually used with PhoneGap but also for standalone web-based apps
3
+ HTML5 build/deploy tool, usually used with PhoneGap but also for standalone web-based apps.
5
4
 
6
- Ruby
7
- ====
5
+ ## Installation
8
6
 
9
- If you're on Windows, you need both Ruby and the Dev tools. There is a great tutorial here:
7
+ Add `gem 'high_five'` to your `Gemfile` or run `gem install high_five`.
10
8
 
11
- https://github.com/oneclick/rubyinstaller/wiki/development-kit
9
+ After installing the high\_five gem, run
10
+
11
+ ```
12
+ $ hi5 init
13
+ ```
14
+
15
+ This will bootstrap your project, creating a `config` directory if one isn't present and a few important files inside:
16
+
17
+ * `config/high_five.rb`
18
+
19
+ The most most important file. It is the main configuration file and where most configuration takes place. See below for configuration options. It contains sensible defaults.
20
+
21
+ * `config/high_five/app-common.js`
22
+
23
+ This is where your shared javascript goes.
24
+
25
+ If you are using a framework like Sencha, this is where you would include the Sencha files.
26
+
27
+ At a minimum, you will likely include the main entry point for your app here.
28
+
29
+ This file is processed with Sprockets, so anything included here will be minified.
30
+
31
+ Do not add library or remote scripts here. Those should be added with `config/high_five.rb` (see below for how to do this).
32
+
33
+ * `config/high_five/app-platform.js`
34
+
35
+ This file is a template and *must* be copied to create `app-<platform>.js` for each platform you have which by default are 'ios' and 'android'.
36
+
37
+ After creating `app-<platform>.js` for each of your platforms, you can delete this file.
38
+
39
+ * `config/high_five/index.html.erb`
40
+
41
+ The entry page for your app.
42
+
43
+ ## Configuration
44
+
45
+ * `config.app_name`
46
+
47
+ TODO What does this do? Probably sets some values in some places
48
+
49
+ * `config.app_id`
50
+
51
+ TODO What does this do? Probably sets some values in some places
52
+
53
+ * `config.root`
54
+
55
+ Defaults to `File.join(File.dirname(__FILE__), '..')` which should be the top-level directory of your app.
56
+
57
+ * `config.destination`
58
+
59
+ This is to where high five deploys your app which is set to `www` by default.
60
+
61
+ If you are using high five with a cordova app, this will need to be set for iOS and Android separately (uncomment the appropriate lines in the platforms section of the config).
62
+
63
+ * `config.windows!`
64
+
65
+ Use this if you're on windows and having problems with a strange ExecJS RuntimeError.
66
+
67
+ * `config.compass_dir`
68
+
69
+ If set, high five will run `compass compile` in the given directory before doing anything else.
70
+
71
+ This makes it possible, for example, to write sass in `resources/sass/app.sass` and have it compiled to `resources/css/app.css` which can then be included into your app with the `stylesheets` method (see below).
72
+
73
+ NB: Make sure you have specified your compass config in `config.rb` in this directory!
74
+
75
+ * `config.minify`
76
+
77
+ TODO Write some words about how minifying works and what you might need installed based on the variations options for minifying.
78
+
79
+ * `config.manifest`
80
+
81
+ Generate [app cache manifest](http://www.w3schools.com/html/html5_app_cache.asp).
82
+ This is usually specified in the `:web` platform, and the manifest file is only created when the environment is `production`.
83
+ You'll only use this if you're developing a javascript web app (e.g. an ember or angular app).
84
+
85
+ * `config.dev_index`
86
+
87
+ Copy generated index.html to given value, index-debug.html by default. The copied file will reference your source files and not the compiled files so that you do not need to deploy between every since code change. You'll only need to deploy when you add/remove a source file.
88
+
89
+ ### Bundling assets into your app
90
+
91
+ The important high five config options for assets are `assets`, `javascripts`, and `stylesheets`.
92
+
93
+ * `assets`
94
+
95
+ This method takes either a directory or file name. When you deploy, those directories/files are copied into `config.destination`.
96
+
97
+ For example, to include images into your app, first create `resources/images`.
98
+ Then in the config file, add `config.assets "resources/images"`. When you deploy it will create `<destination>/resources/images` containing all of your images.
99
+ You can now reference your images with respect to the `<destination>` directory. So a link to an image in your app would look like `resources/images/foobar.png`.
100
+
101
+ * `javascripts`, `stylesheets`
102
+
103
+ To include a javascript file or stylesheet, use the `javascripts` or `stylesheets` method respectively.
104
+ This will add that file to `<destination>/index.html` when deploying.
105
+ See `config/high_five/index.html.erb` to see how this is done.
106
+
107
+ For example, let's say we want to include [moment.js](http://momentjs.com/).
108
+ First we save the minified<sup>[1]</sup> file somewhere, `resources/vendor/javascripts`, for example.
109
+ Then we add `config.javascripts "resources/vendor/javascripts/moment.min.js"` to our config file.
110
+ When we deploy, that file will be included in `<destination>/index.html`!
111
+
112
+ The same is true for stylesheets.
113
+
114
+ Don't forget that the file you give to the `javascripts` and `stylesheets` methods can be anything.
115
+ That means if you want to manage dependencies with npm, for example, you can do `config.javascripts "node_modules/foo/bar.js"`!
116
+
117
+ [1] NB: hi5 does *not* minify your assets! Make sure you use the minified versions of your assets.
118
+
119
+ #### Advanced example
12
120
 
13
- Installation
14
- ============
121
+ Let's say we want to add [FontAwesome](http://fontawesome.io) to our mobile app.
15
122
 
16
- $ gem install high_five
17
- $ cd my_mobile_project
18
- $ hi5 init
123
+ First, we extract the FontAwesome toolkit to `resources/vendor/font-awesome-4.5.0`, deleting everything except the css and fonts directories.
19
124
 
20
- This will bootstrap your project, creating a ```config``` directory if one isn't present,
21
- and also creating a few important files inside, most importantly high_five.rb.
125
+ Then we have high five include that directory with `config.assets "resources/vendor/font-awesome-4.5.0"`.
22
126
 
23
- Configuration
24
- =============
127
+ Then we tell high five to include the FontAwesome css file with `config.stylesheets "resources/vendor/font-awesome-4.5.0/css/font-awesome.min.css"`.
128
+ This includes the FontAwesome stylesheet in `<destination>/index.html` which gives us access to the FontAwesome font-family and the `.fa` classes.
25
129
 
26
- ```hi5 init``` will create all the directories you need, and almost all of your configuration will happen inside of ```config/high_five.rb```. It is reasonably well documented and contains a lot of sensible defaults. I hope to improve the documentation here over time, but for now go read ```high_five.rb```
130
+ That's it!
27
131
 
132
+ Follow a similar procedure for any complex resource you wish to include.
28
133
 
29
- Usage
30
- =====
134
+ * `config.setting`
31
135
 
32
- $ hi5 deploy <platform> -e <environment>
136
+ Using the `config.setting` method, you can create key/value pairs which will be made available in your javascript under `HighFive.Settings`.
33
137
 
34
- This will build your application for a specific platform to the directory specified in high_five.rb.
138
+ For example, `config.setting apiEndpoint: "http://dev.example.com/api"` will make `HighFive.Settings.apiEndpoint` return "http://dev.example.com/api".
35
139
 
140
+ * `config.platform`
141
+
142
+ Using the `config.platform` method defines your target platforms and allows you to create platform-specific configurations.
143
+ Platforms are what you tell high five to deploy with the `hi5 deploy <platform>` command.
144
+ At a minimum this usually includes iOS, Android, and "web" for testing without having to deploy to a device.
145
+
146
+ The method takes a block whose argument is the same type of config object as the top level config object.
147
+
148
+ For example, let's say you want to include iOS specific assets into the iOS version of your app.
149
+ ```ruby
150
+ config.platform :ios do |ios|
151
+ ios.assets "resources/ios"
152
+ end
153
+ ```
154
+
155
+ When `hi5 deploy ios` is ran, high five will include `resources/ios` in the destination.
156
+
157
+ For each platform, you need to make sure `config/high_five/app-<platform>.js` exists.
158
+ See current examples for the minimum contents required in these files.
159
+ This is important for INSERT REASONS HERE. (TODO Why not just say `ios.javascripts "ios_specific_javascript_file.js"` instead?)
160
+
161
+ * `config.environment`
162
+
163
+ Environments function like platforms: they allow you to further specify or override either base or platform-specific settings for each of your environments (production/qa/staging/etc).
164
+ That is, they take precedence over platform configurations.
165
+
166
+ Their primary purpose is to set your app's endpoint, but can be used for anything.
167
+ e.g. You may want a non-minified asset deployed to your device during development, but the minified version deployed all other times.
168
+
169
+ An environment is specified with either `-e` or `--environment` when running `hi5 deploy`.
170
+
171
+ e.g.
172
+
173
+ `hi5 deploy <platform> --environment lan`
174
+
175
+ `hi5 deploy <platform> -e production`
176
+
177
+ At a minimum, you will probably want `:lan` (so you can deploy an app which is pointed at a server running on your machine) and an entry for each environment your app has (production/staging/qa/etc).
178
+ ```ruby
179
+ config.environment :lan do |lan|
180
+ ip = Socket.ip_address_list.detect { |intf| intf.ipv4? && !intf.ipv4_loopback? && !intf.ipv4_multicast? }.ip_address
181
+ lan.setting apiEndpoint: "http://#{ip}:3000" # Or however you specify your server's location.
182
+ # lan.javascripts "resources/vendor/javascripts/some-library-debug-all.js"
183
+ end
184
+
185
+ config.environment :dev do |dev|
186
+ dev.setting apiEndpoint: "http://dev.example.com"
187
+ # dev.javascripts "lib/some-library-minified.js"
188
+ end
189
+
190
+ config.environment :production do |production|
191
+ production.setting apiEndpoint: "http://example.com"
192
+ # production.javascripts "lib/some-library-minified.js"
193
+ # production.minify :uglifier # or :yui
194
+ end
195
+ ```
196
+
197
+ ## Usage
198
+
199
+ * `$ hi5 deploy <platform> -e <environment>`
200
+
201
+ This will build your application for a specific platform with the settings for the given environment to the destination directory specified in `config/high_five.rb`.
202
+
203
+ * `$ hi5 <android|ios>:set_icon path/to/icon.png`
204
+
205
+ By default, high\_five uses ChunkyPNG to resize the icon, but this almost always bad icons.
206
+ We highly recommend adding the [rmagick](https://github.com/rmagick/rmagick) gem (which depends on imagemagick) to your Gemfile along with high\_five.
207
+ High Five will detect that you have rmagick installed and will use it to generate good icons.
208
+
209
+ * `$ hi5 <android|ios>:set_version -v "1.0" -b 200`
210
+
211
+ This sets the publicly visible "version string" and the build number. They are in either `info.plist` or `AndroidManifest.xml` for iOS and Android, respectively.
212
+
213
+ * `$ hi5 dist <platform>`
214
+
215
+ Compiles the native application to an IPA or APK. This is optional, and instead you may use Xcode, Android Studio, gradle, or any other similar tool.
216
+
217
+ If you pass it the `--install` flag, it will attempt to install to a connected device.
218
+
219
+ * There's probably more high five commands that should be documented. If you find any not listed here, open an issue or submit a PR.
220
+
221
+ ### Development Usage
222
+
223
+ #### Build and deploy for browser
224
+
225
+ `hi5 deploy web`
226
+
227
+ Then open index-debug.html inside of google chrome with web security disabled (`google-chrome --disable-web-security`)
228
+
229
+ #### Build and deploy for device
230
+
231
+ Make sure your device and computer are on the same wifi network (subnet).
232
+
233
+ Make sure your server accepts connects from devices on the same subnet.
234
+
235
+ e.g. For rails, start your server like this:
236
+
237
+ `rails server -b 0.0.0.0`
238
+
239
+ ##### Android
240
+
241
+ According to Brett, only the _first_ time you put a build on your device, you need to do this (replace the keystore, alias, password, and alias password with the correct values for your app):
242
+
243
+ `hi5 deploy android --environment lan && hi5 dist android --environment lan --install --ant-flags="-Dkey.store=foobar.keystore -Dkey.alias=foobar -Dkey.store.password=foobar -Dkey.alias.password=foobar"`
244
+
245
+ TODO: hi5 dist should use the debug android target instead of release by default if it doesn't detect signing parameters. It should also generate a big warning about that.
246
+
247
+ After that, this should be sufficient:
248
+
249
+ `hi5 deploy android -e lan && hi5 dist android -e lan --install`
250
+
251
+ *However*, this did not work for me. I had to always use the first command or else hi5 just kept installing the initial build.
252
+
253
+ ##### iOS
254
+
255
+ TODO Write words here. Probably something with Xcode.
256
+
257
+ ## Reading the source
258
+
259
+ TODO Write words here.
260
+
261
+ ## Ruby
262
+
263
+ If you're on Windows, you need both Ruby and the Dev tools. There is a great tutorial here:
264
+
265
+ https://github.com/oneclick/rubyinstaller/wiki/development-kit
36
266
 
267
+ ## TODO
268
+ * Have `hi5 init` create resources/images
269
+ * Confirm the `assets` method can take a file.
270
+ * Just create the app-ios.js and app-android.js files instead of app-platform.js. This would get us a little closer to "just working".
@@ -11,7 +11,7 @@ module HighFive
11
11
 
12
12
  def android_manifest_path
13
13
  if options[:platform_path]
14
- platform_path = File.join(options[:platform_path], "AndroidManifest.xml")
14
+ platform_path = Dir[File.join(options[:platform_path], "**/AndroidManifest.xml")][0]
15
15
  return platform_path if File.exists?(platform_path)
16
16
  end
17
17
 
@@ -43,7 +43,7 @@ module HighFive
43
43
  FileUtils.rm_rf(self.destination_root)
44
44
  FileUtils.mkdir_p(self.destination_root)
45
45
 
46
- #todo add to config
46
+ # TODO Add to config
47
47
  say "Deploying app: <#{@platform}> <#{options[:environment]}>"
48
48
  say "\t#{self.destination_root}"
49
49
  say " -Weinre url: #{@weinre_url}" if @weinre_url
@@ -98,6 +98,7 @@ module HighFive
98
98
  def system_or_die(cmd)
99
99
  system(cmd)
100
100
  if $?.exitstatus != 0
101
+ puts "FATAL: Cannot execute '#{cmd}'"
101
102
  exit $?.exitstatus
102
103
  end
103
104
  end
@@ -1,3 +1,3 @@
1
1
  module HighFive
2
- VERSION = "0.3.12"
2
+ VERSION = "0.3.13"
3
3
  end
@@ -1,4 +1,5 @@
1
- //This is where you define the javascripts you include and their include order for your app.
2
- //Only include app code that you want minified here, add library or remote scripts to config/high_five.rb
1
+ // This is where you define the javascripts you include and their include order for your app.
2
+ // Only include app code that you want minified here, add library or remote scripts to config/high_five.rb
3
+ // For example
3
4
  //= require ../../javascripts/app.js
4
- //= require_tree ../../javascripts/app
5
+ //= require_tree ../../javascripts/app
@@ -1,27 +1,29 @@
1
1
  <!doctype html>
2
2
  <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title><%= @meta[:title] %></title>
6
- <meta name="description" content="<%= @meta[:description] %>" />
7
- <% @stylesheets.each do |ss| -%>
8
- <link rel="stylesheet" href="<%= ss %>" type="text/css" />
9
- <% end -%>
10
- <% if @platform != 'web' -%>
11
- <% if @environment == 'development' -%>
12
- <script type="text/javascript">
13
- window.onerror = function(e,u,l) {
14
- alert("Error caught" + e + " " + u + ":" + l);
15
- };
16
- </script>
17
- <% end -%>
18
- <% end -%>
19
- <%= @high_five_javascript %>
20
- <%- @javascripts.each do |js| -%>
21
- <script type="text/javascript" src="<%= js %>"></script>
22
- <%- end -%>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title><%= @meta[:title] %></title>
6
+ <meta name="description" content="<%= @meta[:description] %>" />
23
7
 
24
- </head>
25
- <body></body>
8
+ <%- @stylesheets.reverse.each do |ss| -%>
9
+ <link rel="stylesheet" href="<%= ss %>" type="text/css" />
10
+ <%- end -%>
11
+
12
+ <%- if @platform != 'web' && @environment == 'lan' -%>
13
+ <script type="text/javascript">
14
+ window.onerror = function(e,u,l) {
15
+ alert("Error caught " + e + " " + u + ":" + l);
16
+ };
17
+ </script>
18
+ <%- end -%>
19
+
20
+ <%= @high_five_javascript %>
21
+
22
+ <%- @javascripts.reverse.each do |js| -%>
23
+ <script type="text/javascript" src="<%= js %>"></script>
24
+ <%- end -%>
25
+ </head>
26
+ <body>
27
+ </body>
26
28
  </html>
27
29
 
@@ -5,67 +5,84 @@ HighFive::Config.configure do |config|
5
5
  config.root = File.join(File.dirname(__FILE__), '..')
6
6
  # config.destination = "www"
7
7
 
8
- # This will run cordova prepare in this directory. Will also default your platform destination to cordova/www
8
+ # This will run cordova prepare in this directory. Will also default your platform destination to cordova/www.
9
9
  # config.cordova_path "cordova"
10
10
 
11
- # Uncomment this if you're on windows and having problems with a strange ExecJS RuntimeError
11
+ # Uncomment this if you're on windows and having problems with a strange ExecJS RuntimeError.
12
12
  # config.windows!
13
13
 
14
- # This will add the resources folder to all platforms (stylesheets etc.)
15
- # config.assets "resources"
16
-
17
- # Include javascript libraries
18
- # These get included before everything else in the app, and are *not* minified
14
+ # Include assets (images, fonts, etc).
15
+ # This will add the given directory or file to the <destination>/resources directory.
16
+ # e.g.
17
+ # config.assets "resources/images"
18
+ # config.assets "resources/vendor/font-awesome-4.5.0"
19
19
 
20
+ # Include javascript libraries.
21
+ # These get included before everything else in the app and are *not* minified.
22
+ # Make sure you link to the minified versions of your assets if that's what you desire.
23
+ # e.g.
20
24
  # config.javascripts "http://maps.google.com/maps/api/js?sensor=true"
21
- # config.javascripts "lib/jquery-min.js"
22
-
23
- # Run `compass compile` in this directory before doing anything
24
- # config.compass_dir "resources/sass"
25
+ # config.javascripts "resources/vendor/javascripts/jquery-min.js"
25
26
 
26
- # copy and include these stylesheets in the html
27
+ # Include stylesheets.
28
+ # e.g.
27
29
  # config.stylesheets "resources/css/app.css"
28
30
  # config.stylesheets "resources/css/jquery-ui.css"
31
+ # config.stylesheets "resources/vendor/font-awesome-4.5.0/css/font-awesome.min.css"
29
32
 
30
- # Basic key/value settings that will be available to your javascript
31
- # config.setting base_url: "http://dev.example.com/api" # HighFive.Settings.base_url = "http://dev.example.com/api"
33
+ # Run `compass compile` in this directory before doing anything.
34
+ # config.compass_dir "resources/sass"
32
35
 
33
- # Configure plaform specific settings like this
36
+ # Basic key, value pairs that will be available to your javascript under HighFive.Settings.
37
+ # config.setting apiEndpoint: "http://dev.example.com/api" # HighFive.Settings.apiEndpoint will return "http://dev.example.com/api"
38
+
39
+ # ===========================================================================
40
+ # Platforms
41
+ # Configure plaform specific settings like this.
42
+ # Make sure config/high_five/app-<platform>.js exists. Put platform specific javascript in there.
43
+ # See existing files for minimum contents.
44
+ # Those files are managed by sprockets and are used to determine the javascript include order.
45
+ # ===========================================================================
34
46
  config.platform :ios do |ios|
35
- # ios.destination = "www-ios"
47
+ # ios.destination = "cordova/platforms/ios/www" # Cordova
36
48
  # ios.assets "resources/ios"
37
49
  end
38
50
 
39
51
  config.platform :android do |android|
40
- # android.destination = "www-android"
52
+ # android.destination = "cordova/platforms/android/assets/www" # Cordova
41
53
  # android.assets "resources/android"
42
54
  end
43
55
 
44
- config.platform :Web do |web|
56
+ config.platform :web do |web|
45
57
  web.destination = "www"
46
- web.manifest = true #generate app cache manifest (production env only)
47
- web.dev_index = "index-debug.html" #copy generated index.html to index-debug (development env only)
58
+ web.setting apiEndpoint: 'http://localhost:3000' # Or however you specify your server's location.
59
+ web.manifest = true # Generate app cache manifest. This is only done when environment is 'production'.
60
+ web.dev_index = "index-debug.html" # Copy generated index.html to index-debug.
48
61
  end
49
62
 
50
- # if you need platform-specific javascripts,
51
- # simply create app-<platform>.js
52
- # these files are managed by sprockets, and are used to determine the javascript include order
63
+ # ===========================================================================
64
+ # Environments
65
+ # Configure environment specific settings like this.
66
+ # Environments work just like platforms and allow you to further customize/override settings.
67
+ # These take precedence over the platform overrides.
68
+ # e.g.
69
+ # You can deploy to an iOS device and point the app at your production server.
70
+ # or deploy to an Android device and point the app at your dev/staging/qa server.
71
+ # ===========================================================================
72
+ config.environment :lan do |lan|
73
+ ip = Socket.ip_address_list.detect { |intf| intf.ipv4? && !intf.ipv4_loopback? && !intf.ipv4_multicast? }.ip_address
74
+ lan.setting apiEndpoint: "http://#{ip}:3000" # Or however you specify your server's location.
75
+ # lan.javascripts "resources/vendor/javascripts/some-library-debug-all.js"
76
+ end
53
77
 
54
- # Environment support: production/development/etc
55
- # Environments work just like platforms
56
- config.environment :development do |development|
57
- # development.javascripts "lib/some-library-debug-all.js"
58
- # development.setting base_url: "http://dev.example.com:1234/api/"
78
+ config.environment :dev do |dev|
79
+ dev.setting apiEndpoint: "http://dev.example.com"
80
+ # dev.javascripts "lib/some-library-minified.js"
59
81
  end
60
82
 
61
83
  config.environment :production do |production|
84
+ production.setting apiEndpoint: "http://example.com"
62
85
  # production.javascripts "lib/some-library-minified.js"
63
- # production.setting base_url: "http://production.example.com/api/" #these take precedence over the platform overrides
64
86
  # production.minify :uglifier # or :yui
65
87
  end
66
-
67
- # config.environment :lan do |lan|
68
- # ip = Socket.ip_address_list.detect{|intf| intf.ipv4? and !intf.ipv4_loopback? and !intf.ipv4_multicast?}.ip_address
69
- # lan.setting apiEndpoint: "http://#{ip}:3000"
70
- # end
71
- end
88
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: high_five
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.12
4
+ version: 0.3.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Samson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-14 00:00:00.000000000 Z
11
+ date: 2016-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json