ember-i18n-rails 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +1 -1
- data/lib/ember-i18n-rails.rb +0 -19
- data/lib/ember/i18n/version.rb +1 -1
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/lib/ember-i18n-rails.rb
CHANGED
@@ -7,9 +7,6 @@ module Ember
|
|
7
7
|
require "ember/i18n/railtie" if Rails.version >= "3.0"
|
8
8
|
require "ember/i18n/engine" if Rails.version >= "3.1"
|
9
9
|
|
10
|
-
# deep_merge by Stefan Rusterholz, see http://www.ruby-forum.com/topic/142809
|
11
|
-
MERGER = proc { |key, v1, v2| Hash === v1 && Hash === v2 ? v1.merge(v2, &MERGER) : v2 }
|
12
|
-
|
13
10
|
# Under rails 3.1.1 and higher, perform a check to ensure that the
|
14
11
|
# full environment will be available during asset compilation.
|
15
12
|
# This is required to ensure I18n is loaded.
|
@@ -59,27 +56,11 @@ module Ember
|
|
59
56
|
result.stringify_keys
|
60
57
|
end
|
61
58
|
|
62
|
-
# Load configuration file for partial exporting and
|
63
|
-
# custom output directory
|
64
|
-
def config
|
65
|
-
if config?
|
66
|
-
(YAML.load_file(config_file) || {}).with_indifferent_access
|
67
|
-
else
|
68
|
-
{}
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
# Check if configuration file exist
|
73
|
-
def config?
|
74
|
-
File.file? config_file
|
75
|
-
end
|
76
|
-
|
77
59
|
# Copy configuration and JavaScript library files to
|
78
60
|
# <tt>config/ember-i18n.yml</tt> and <tt>public/javascripts/i18n.js</tt>.
|
79
61
|
def setup!
|
80
62
|
FileUtils.mkdir_p(export_dir)
|
81
63
|
FileUtils.cp(File.dirname(__FILE__) + "/../vendor/assets/javascripts/ember-i18n.js", javascript_file)
|
82
|
-
FileUtils.cp(File.dirname(__FILE__) + "/../config/ember-i18n.yml", config_file) unless config?
|
83
64
|
end
|
84
65
|
|
85
66
|
# Retrieve an updated JavaScript library from Github.
|
data/lib/ember/i18n/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ember-i18n-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -147,7 +147,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
147
147
|
version: '0'
|
148
148
|
segments:
|
149
149
|
- 0
|
150
|
-
hash:
|
150
|
+
hash: 1597518861932521648
|
151
151
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
152
|
none: false
|
153
153
|
requirements:
|
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
156
|
version: '0'
|
157
157
|
segments:
|
158
158
|
- 0
|
159
|
-
hash:
|
159
|
+
hash: 1597518861932521648
|
160
160
|
requirements: []
|
161
161
|
rubyforge_project:
|
162
162
|
rubygems_version: 1.8.23
|