applocale-ruby 0.0.2 → 0.0.10

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
  SHA256:
3
- metadata.gz: cd22813435f5b08b939eb097c9f0e10193a4aa04843491ff439e9eac91745e42
4
- data.tar.gz: a1a0c8d9f364f85be39d203502bb0307940727fb417ef9d3e4dced91efb54e45
3
+ metadata.gz: 992e5cd3f0948c9f7cb7a20d8937d6ec62e1bd2b9f009260ca18f01e8770868d
4
+ data.tar.gz: 27138c786bd8aa1cba40b574ec316f0b9ba0ac1ed8101f5a0f12d576ecd59417
5
5
  SHA512:
6
- metadata.gz: 6fe6c97dd21584e6f9fe18ff53e3e1e26fd8c8dff6cea7e2f1038500976242fb0353066fd448aa18877e79af37e3e1ae5386b10850f933b14c3f1e0ac390e7cf
7
- data.tar.gz: 93814906a356d82240e71de93e5996f22be1b2d4a6257833d4138760ea7a0e2fb5d95ec61d797b70f788cd188ae9b7ce3adb679f2e07a154de095477a7dfee50
6
+ metadata.gz: fbb57f422b89498e5e095d2ddbe24e578cc04c278e33fca46f6ddad75c05b2a2cb880b3f9cfa3a1d386f33a1e4cfabdc330c4884f73f2273c9ac2528e97742d7
7
+ data.tar.gz: 81d5b21b2dc7bcbd5b1d1abea9d4c6dea6058ba77b4d0b59af1b4ae43b647ad5b990b1bb7bedc476cd72a64e1ea3fb31cbc699753aa39f78458f969565007865
@@ -0,0 +1,3 @@
1
+ # 0.0.10
2
+
3
+ - Initial public release, welcome to a better way to manage your app translations 👋
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- applocale-ruby (0.0.2)
4
+ applocale-ruby (0.0.10)
5
5
  httparty (~> 0.18.0)
6
- thor (~> 1.0)
6
+ thor (>= 0.18.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
@@ -13,7 +13,7 @@ GEM
13
13
  multi_xml (>= 0.5.2)
14
14
  mime-types (3.3.1)
15
15
  mime-types-data (~> 3.2015)
16
- mime-types-data (3.2020.0425)
16
+ mime-types-data (3.2020.0512)
17
17
  minitest (5.14.0)
18
18
  multi_xml (0.6.0)
19
19
  rake (10.5.0)
data/README.md CHANGED
@@ -1,15 +1,31 @@
1
- # Applocale::Ruby
1
+ # AppLocale
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/applocale/ruby`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Welcome to AppLocale's Ruby gem. This gem helps customers of AppLocale.dev to easily pull down their
4
+ latest translations with a simple `bundle exec applocale pull`.
4
5
 
5
- TODO: Delete this and the text above, and describe your gem
6
+ Getting started with AppLocale will give you a free 14-day trial.
6
7
 
7
8
  ## Installation
8
9
 
10
+ ### With our RailsBytes application template:
11
+
12
+ This application template will install the gem for you, and walk you through setting up a configration file for your project. You'll need to login to your https://applocale.dev account, click on your avatar and click API Tokens to have the information ready for this step.
13
+
14
+ You should **always** review contents of scripts you run before hand, you may do so by visiting this url and reading the script: https://railsbytes.com/public/templates/X8Bsjj
15
+
16
+ ```
17
+ rails app:template LOCATION="https://railsbytes.com/script/X8Bsjj"
18
+ ```
19
+
20
+ ### Manually:
21
+
9
22
  Add this line to your application's Gemfile:
10
23
 
11
24
  ```ruby
12
- gem 'applocale-ruby'
25
+
26
+ group :development do
27
+ gem 'applocale-ruby'
28
+ end
13
29
  ```
14
30
 
15
31
  And then execute:
@@ -20,20 +36,42 @@ Or install it yourself as:
20
36
 
21
37
  $ gem install applocale-ruby
22
38
 
39
+ Then follow the instructions in Usage to setup your configuration file.
40
+
23
41
  ## Usage
24
42
 
25
- TODO: Write usage instructions here
43
+ Using AppLocale's gem requires a configuration file to be present. By default we assume this file to
44
+ live at `config/applocale.yml` but you can alternatively run each command with `--config-file=path-to-applocale.yml`
26
45
 
27
- ## Development
46
+ You'll need to login to your https://applocale.dev account, click on your avatar and click API Tokens to have the information ready for this step after creating an API Token and Project.
28
47
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
48
+ **Sample configuration file:**
30
49
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
50
+ ```yaml
51
+ applocale:
52
+ project_id: 234qfewaf
53
+ api_key: API_KEY_HERE
54
+ locale_directory: "config/locales" # Default, you can override this if you wish.
55
+ ```
56
+
57
+ Once you have your configuration file setup for your project you can proceed to use the following commands.
58
+
59
+ After that, to pull ALL your setup languages in AppLocale:
60
+
61
+ ```
62
+ bundle exec applocale pull
63
+ ```
64
+
65
+ Or just your specified languages:
66
+
67
+ ```
68
+ bundle exec applocale en es
69
+ ```
32
70
 
33
71
  ## Contributing
34
72
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/applocale-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
73
+ Bug reports and pull requests are welcome on GitHub at https://github.com/applocale/applocale-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
74
 
37
75
  ## Code of Conduct
38
76
 
39
- Everyone interacting in the Applocale::Ruby project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/applocale-ruby/blob/master/CODE_OF_CONDUCT.md).
77
+ Everyone interacting in the Applocale::Ruby project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/applocale/applocale-ruby/blob/master/CODE_OF_CONDUCT.md).
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
 
17
17
  spec.metadata["homepage_uri"] = spec.homepage
18
18
  spec.metadata["source_code_uri"] = "https://github.com/applocale/applocale-ruby"
19
- spec.metadata["changelog_uri"] = "https://github.com/applocale/applocale-ruby"
19
+ spec.metadata["changelog_uri"] = "https://github.com/applocale/applocale-ruby/blob/master/CHANGELOG.md"
20
20
 
21
21
  # Specify which files should be added to the gem when it is released.
22
22
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.required_ruby_version = ">= 2.3.0"
31
31
 
32
32
  spec.add_dependency 'httparty', '~> 0.18.0'
33
- spec.add_dependency 'thor', '~> 1.0'
33
+ spec.add_dependency 'thor', '>= 0.18.0'
34
34
 
35
35
  spec.add_development_dependency "bundler", "~> 2.0"
36
36
  spec.add_development_dependency "rake", "~> 10.0"
@@ -8,7 +8,7 @@ module AppLocale
8
8
  relative_file_path = "#{config.locale_directory}/#{response.dig('language_code')}.yml"
9
9
  file_path = File.expand_path(relative_file_path)
10
10
  File.write(file_path, response.dig('yaml'))
11
- puts "[AppLocale] Wrote translations for #{response.dig('language_code')} to #{relative_file_path}"
11
+ puts "[AppLocale] Wrote translations for #{response.dig('language_code')} to #{relative_file_path}"
12
12
  end
13
13
 
14
14
  private
@@ -8,7 +8,7 @@ module AppLocale
8
8
  response = client.project_information
9
9
  if response.dig("success")
10
10
  languages = response.dig("languages")
11
- puts "[AppLocale] Received #{languages} from AppLocale..." if options[:verbose]
11
+ puts "[AppLocale] Received #{languages} from AppLocale..." if options[:verbose]
12
12
  else
13
13
  puts "[AppLocale] #{response.dig('message')}"
14
14
  exit 1
@@ -20,7 +20,7 @@ module AppLocale
20
20
  puts "[AppLocale] Fetching translations for #{language_code}..."
21
21
  response = client.export(language_code)
22
22
  if response.dig("success")
23
- puts "[AppLocale] Received #{response} from AppLocale" if options[:verbose]
23
+ puts "[AppLocale] Received #{response} from AppLocale" if options[:verbose]
24
24
  AppLocale::FileWriter.new(config, options).call(response)
25
25
  else
26
26
  puts "[AppLocale] #{response.dig('message')}"
@@ -1,3 +1,3 @@
1
1
  module AppLocale
2
- VERSION = "0.0.2".freeze
2
+ VERSION = "0.0.10".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: applocale-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Fomera
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-10 00:00:00.000000000 Z
11
+ date: 2020-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: thor
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '1.0'
33
+ version: 0.18.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '1.0'
40
+ version: 0.18.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -89,6 +89,7 @@ extensions: []
89
89
  extra_rdoc_files: []
90
90
  files:
91
91
  - ".gitignore"
92
+ - CHANGELOG.md
92
93
  - CODE_OF_CONDUCT.md
93
94
  - Gemfile
94
95
  - Gemfile.lock
@@ -112,7 +113,7 @@ licenses: []
112
113
  metadata:
113
114
  homepage_uri: https://applocale.dev
114
115
  source_code_uri: https://github.com/applocale/applocale-ruby
115
- changelog_uri: https://github.com/applocale/applocale-ruby
116
+ changelog_uri: https://github.com/applocale/applocale-ruby/blob/master/CHANGELOG.md
116
117
  post_install_message:
117
118
  rdoc_options: []
118
119
  require_paths: