translations_sync 0.3.0 → 0.3.1

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/Changelog CHANGED
@@ -1,3 +1,6 @@
1
+ 2012-09-19 v.0.3.1
2
+ * Rakfile should not be copied if using rails. Do not forget to remove the old one!
3
+
1
4
  2011-08-19 v.0.3.0
2
5
  * Fix for pluralization key removal
3
6
 
data/README CHANGED
@@ -17,9 +17,17 @@ Installation
17
17
  1. As plugin
18
18
  rails plugin install http://github.com/dima4p/translations_sync/
19
19
 
20
- 2. As gem
21
- sudo gem install translations_sync
22
- translations_sync
20
+ 2. As gem: add to your Gemfile
21
+ gem 'translations_sync'
22
+
23
+ 3. If you are using the gem outside rails, execute the following command to copy
24
+ the rake file into your project's directory lib/tasks.
25
+
26
+ bundle exec translations_sync
27
+
28
+ Or, if you keep your rake tesks in other place, you can give the argument with the proper path
29
+
30
+ bundle exec translations_sync path/to/directory
23
31
 
24
32
 
25
33
  Description
data/Rakefile CHANGED
@@ -1,4 +1,4 @@
1
- require 'rake/rdoctask'
1
+ require 'rdoc/task'
2
2
  require 'rubygems'
3
3
  require 'rake/gempackagetask'
4
4
  # require 'spec/rake/spectask'
@@ -6,7 +6,7 @@ require 'rubygems/specification'
6
6
  require 'date'
7
7
 
8
8
  GEM = "translations_sync"
9
- GEM_VERSION = "0.3.0"
9
+ GEM_VERSION = "0.3.1"
10
10
  AUTHOR = "Dmitri Koulikoff"
11
11
  EMAIL = "koulikoff@gmail.com"
12
12
  HOMEPAGE = "http://github.com/dima4p/translations_sync/"
@@ -4,12 +4,11 @@ require 'fileutils'
4
4
 
5
5
  from = File.join(File.split(Gem.bin_path('translations_sync')).first,
6
6
  '..', 'lib', 'tasks', '*.rake')
7
- to = File.expand_path('.', File.join('lib', 'tasks'))
8
- environment = File.expand_path('.', File.join('config', 'environment.rb'))
7
+ to = ARGV[0] || File.expand_path('.', File.join('lib', 'tasks'))
9
8
 
10
- if File.directory? to and File.exists? environment
9
+ if File.directory? to
11
10
  FileUtils.cp Dir.glob(from), to
12
11
  puts "Rake file are copied to #{to}"
13
12
  else
14
- puts 'You must run it from within the rails directory'
13
+ puts "Directory #{to} is missing"
15
14
  end
@@ -11,6 +11,14 @@ class Hash
11
11
  end
12
12
  end
13
13
 
14
+ if defined?(Rails)
15
+ class Railtie < Rails::Railtie
16
+ rake_tasks do
17
+ load 'tasks/translations_sync.rake'
18
+ end
19
+ end
20
+ end
21
+
14
22
  class TranslationsSync
15
23
 
16
24
  attr_accessor :translations, :list
metadata CHANGED
@@ -1,47 +1,42 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: translations_sync
3
- version: !ruby/object:Gem::Version
4
- hash: 19
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 3
9
- - 0
10
- version: 0.3.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.1
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Dmitri Koulikoff
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-08-19 00:00:00 +03:00
19
- default_executable: translations_sync
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2012-09-16 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: ya2yaml
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
33
22
  type: :runtime
34
- version_requirements: *id001
35
- description: Synchronizes the different locales represeinted in yaml, in particular, for I18n
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ description: Synchronizes the different locales represeinted in yaml, in particular,
31
+ for I18n
36
32
  email: koulikoff@gmail.com
37
- executables:
33
+ executables:
38
34
  - translations_sync
39
35
  extensions: []
40
-
41
- extra_rdoc_files:
36
+ extra_rdoc_files:
42
37
  - README
43
38
  - MIT-LICENSE
44
- files:
39
+ files:
45
40
  - MIT-LICENSE
46
41
  - README
47
42
  - Rakefile
@@ -51,39 +46,29 @@ files:
51
46
  - lib/tasks/translations_sync.rake
52
47
  - lib/translations_sync.rb
53
48
  - spec/spec_helper.rb
54
- has_rdoc: true
55
49
  homepage: http://github.com/dima4p/translations_sync/
56
50
  licenses: []
57
-
58
51
  post_install_message:
59
52
  rdoc_options: []
60
-
61
- require_paths:
53
+ require_paths:
62
54
  - lib
63
- required_ruby_version: !ruby/object:Gem::Requirement
55
+ required_ruby_version: !ruby/object:Gem::Requirement
64
56
  none: false
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- hash: 3
69
- segments:
70
- - 0
71
- version: "0"
72
- required_rubygems_version: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ! '>='
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
62
  none: false
74
- requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- hash: 3
78
- segments:
79
- - 0
80
- version: "0"
63
+ requirements:
64
+ - - ! '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
81
67
  requirements: []
82
-
83
68
  rubyforge_project:
84
- rubygems_version: 1.3.7
69
+ rubygems_version: 1.8.19
85
70
  signing_key:
86
71
  specification_version: 3
87
- summary: Synchronizes the different locales represeinted in yaml, in particular, for I18n
72
+ summary: Synchronizes the different locales represeinted in yaml, in particular, for
73
+ I18n
88
74
  test_files: []
89
-