phrasing 4.0.0 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/MIT-LICENSE +0 -0
- data/README.md +5 -5
- data/Rakefile +0 -0
- data/app/assets/fonts/icomoon.dev.svg +0 -0
- data/app/assets/fonts/icomoon.eot +0 -0
- data/app/assets/fonts/icomoon.svg +0 -0
- data/app/assets/fonts/icomoon.ttf +0 -0
- data/app/assets/fonts/icomoon.woff +0 -0
- data/app/assets/images/phrasing_icon_edit_all.png +0 -0
- data/app/assets/javascripts/phrasing_engine.js +0 -0
- data/app/assets/stylesheets/phrasing_engine.css +0 -0
- data/app/models/phrasing_phrase.rb +1 -1
- data/app/models/phrasing_phrase_version.rb +0 -0
- data/app/views/layouts/phrasing.html.haml +0 -0
- data/app/views/phrasing/_initializer.html.haml +0 -0
- data/app/views/phrasing/_menu.html.haml +0 -0
- data/app/views/phrasing/_messages.html.haml +0 -0
- data/app/views/phrasing_phrases/edit.html.haml +0 -0
- data/app/views/phrasing_phrases/help.html.haml +0 -0
- data/lib/generators/phrasing/phrasing_generator.rb +11 -1
- data/lib/generators/phrasing/templates/db/migrate/create_phrasing_phrase_versions.rb +2 -2
- data/lib/generators/phrasing/templates/db/migrate/create_phrasing_phrases.rb +2 -2
- data/lib/phrasing/version.rb +1 -1
- data/spec/dummy/Rakefile +0 -0
- data/spec/dummy/app/controllers/application_controller.rb +0 -0
- data/spec/dummy/app/helpers/application_helper.rb +0 -0
- data/spec/dummy/app/helpers/phrasing_helper.rb +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/views/layouts/application.html.erb +0 -0
- data/spec/dummy/config.ru +0 -0
- data/spec/dummy/config/application.rb +0 -0
- data/spec/dummy/config/boot.rb +0 -0
- data/spec/dummy/config/database.yml +0 -0
- data/spec/dummy/config/environment.rb +0 -0
- data/spec/dummy/config/environments/development.rb +0 -0
- data/spec/dummy/config/environments/production.rb +0 -0
- data/spec/dummy/config/environments/test.rb +0 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -0
- data/spec/dummy/config/initializers/inflections.rb +0 -0
- data/spec/dummy/config/initializers/phrasing.rb +0 -0
- data/spec/dummy/config/initializers/secret_token.rb +0 -0
- data/spec/dummy/config/initializers/session_store.rb +0 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -0
- data/spec/dummy/config/locales/en.yml +0 -0
- data/spec/dummy/db/.gitkeep +0 -0
- data/spec/dummy/db/migrate/20131120000855_create_phrasing_phrases.phrasing_rails_engine.rb +0 -0
- data/spec/dummy/db/migrate/20131120000856_create_phrasing_phrase_versions.phrasing_rails_engine.rb +0 -0
- data/spec/dummy/public/404.html +0 -0
- data/spec/dummy/public/422.html +0 -0
- data/spec/dummy/public/500.html +0 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/factories/phrasing_phrases.rb +0 -0
- data/spec/models/phrasing_phrase_spec.rb +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55d147e3e48d972d348630d456c2d586f67f9774
|
4
|
+
data.tar.gz: ceae3db8c6045a2c94fbf3ffd44e3fc9ac9fee54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2813efc6bec82a7490c6e97f16699b61180d8b94dc86b54a6603e9ea5e36079318ec7ac28202698ab3f6ab175e98184491a99203c687dcc225f29f9db8390f10
|
7
|
+
data.tar.gz: 16c4d3e4e752301beadfd28ae79d7ea4adfde5d3ae4cd405801a113096408f468cadf3689f9d87ae18a51ee292a7b48d142a479fc5a5cca198cf1b52dbb53fe9
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Phrasing Change Log
|
2
2
|
|
3
|
+
## 4.1.0 (May 17th, 2018)
|
4
|
+
|
5
|
+
Fix generated migration files for Rails 5
|
6
|
+
```
|
7
|
+
Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for.
|
8
|
+
```
|
9
|
+
|
10
|
+
Fixed Rails 5.2 deprecation issue with `class_name`:
|
11
|
+
```
|
12
|
+
A class was passed to :class_name but we are expecting a string.
|
13
|
+
```
|
14
|
+
|
3
15
|
## 4.0.0 (February 27th, 2018)
|
4
16
|
|
5
17
|
### Separation of I18n and Phrasing:
|
data/MIT-LICENSE
CHANGED
File without changes
|
data/README.md
CHANGED
@@ -42,10 +42,10 @@ module PhrasingHelper
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
```
|
45
|
-
Include the phrasing **html** initializer
|
45
|
+
Include the phrasing **html** initializer right below the `<body>` tag in your application layout file.
|
46
46
|
|
47
|
-
```
|
48
|
-
|
47
|
+
```
|
48
|
+
<%= render 'phrasing/initializer' %>
|
49
49
|
```
|
50
50
|
|
51
51
|
Include the required **javascript** files:
|
@@ -72,11 +72,11 @@ Include the required **stylesheet** file:
|
|
72
72
|
|
73
73
|
You can start adding new phrases by simply adding them in your view file:
|
74
74
|
|
75
|
-
|
75
|
+
<%= phrase('my-first-phrase') %>
|
76
76
|
|
77
77
|
Aside from editing phrases (basically, Rails translations) you can also edit model attributes inline. Use the same `phrase` method, with the first attribute being the record in question, and the second one the attribute you wish to make editable:
|
78
78
|
|
79
|
-
|
79
|
+
<%= phrase(@post, :title) %>
|
80
80
|
|
81
81
|
In the above example, <tt>@post</tt> is the record with a <tt>title</tt> attribute.
|
82
82
|
|
data/Rakefile
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -4,7 +4,7 @@ class PhrasingPhrase < ActiveRecord::Base
|
|
4
4
|
# validate :uniqueness_of_key_on_locale_scope, on: :create
|
5
5
|
validates_uniqueness_of :key, scope: [:locale]
|
6
6
|
|
7
|
-
has_many :versions, dependent: :destroy, class_name: PhrasingPhraseVersion
|
7
|
+
has_many :versions, dependent: :destroy, class_name: 'PhrasingPhraseVersion'
|
8
8
|
|
9
9
|
after_update :version_it
|
10
10
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -23,4 +23,14 @@ class PhrasingGenerator < Rails::Generators::Base
|
|
23
23
|
sleep 1 # migration numbers should differentiate
|
24
24
|
Time.now.utc.strftime("%Y%m%d%H%M%S")
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
|
+
def migration_version
|
28
|
+
if rails5?
|
29
|
+
"[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def rails5?
|
34
|
+
Rails.version.start_with? '5'
|
35
|
+
end
|
36
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreatePhrasingPhraseVersions < ActiveRecord::Migration
|
1
|
+
class CreatePhrasingPhraseVersions < ActiveRecord::Migration<%= migration_version %>
|
2
2
|
def change
|
3
3
|
create_table :phrasing_phrase_versions do |t|
|
4
4
|
t.integer :phrasing_phrase_id
|
@@ -7,4 +7,4 @@ class CreatePhrasingPhraseVersions < ActiveRecord::Migration
|
|
7
7
|
end
|
8
8
|
add_index :phrasing_phrase_versions, :phrasing_phrase_id
|
9
9
|
end
|
10
|
-
end
|
10
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreatePhrasingPhrases < ActiveRecord::Migration
|
1
|
+
class CreatePhrasingPhrases < ActiveRecord::Migration<%= migration_version %>
|
2
2
|
def change
|
3
3
|
create_table :phrasing_phrases do |t|
|
4
4
|
t.string :locale
|
@@ -7,4 +7,4 @@ class CreatePhrasingPhrases < ActiveRecord::Migration
|
|
7
7
|
t.timestamps
|
8
8
|
end
|
9
9
|
end
|
10
|
-
end
|
10
|
+
end
|
data/lib/phrasing/version.rb
CHANGED
data/spec/dummy/Rakefile
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/dummy/config.ru
CHANGED
File without changes
|
File without changes
|
data/spec/dummy/config/boot.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/dummy/db/.gitkeep
CHANGED
File without changes
|
File without changes
|
data/spec/dummy/db/migrate/20131120000856_create_phrasing_phrase_versions.phrasing_rails_engine.rb
CHANGED
File without changes
|
data/spec/dummy/public/404.html
CHANGED
File without changes
|
data/spec/dummy/public/422.html
CHANGED
File without changes
|
data/spec/dummy/public/500.html
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phrasing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomislav Car
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-05-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -200,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
200
200
|
version: '0'
|
201
201
|
requirements: []
|
202
202
|
rubyforge_project:
|
203
|
-
rubygems_version: 2.
|
203
|
+
rubygems_version: 2.6.11
|
204
204
|
signing_key:
|
205
205
|
specification_version: 4
|
206
206
|
summary: Edit phrases inline for Rails applications!
|