administrate-field-tinymce 0.0.1 → 1.0.0

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: d4444085b34ab931bd449acdf980edae593a4116a6ca873a10f69eef3cd50d2e
4
- data.tar.gz: 20bb74123f1655144669300c7ec4e8c073e8176b4faaef253d84e5130e4350d8
3
+ metadata.gz: 9ed9c0fa0cfde2b8719fb14ca6820b3d348db0b782626ce13767ef50b54a19bf
4
+ data.tar.gz: 29c87925663ac656a901f7803ffe7138ad27cc8dfcb7e2ff4d4ad51ef0191c73
5
5
  SHA512:
6
- metadata.gz: c446d5c4a975a197c4fcb76321d7970a23549ac392ed0ac57115453563c4f6248da9da94db7a8b16eba2fcb4208469cb4559e7783b7841f156e9cc3e8243fe81
7
- data.tar.gz: c95ef6e99e2a07b86ff25743be8e61028a644c850868a2a96f69a1963b7a9cd7f68513e888795fdeebba114088bd6fb53c304b5ce27c507038bf1fbe4c9d440f
6
+ metadata.gz: d128f1c2392941417dcf276cb831fea5835ea721ae63af411637193d2f69c4662562ff732218cd038693e3b0a0f8f485492df6722e7fbae15ff3f1667999181d
7
+ data.tar.gz: f207dd6f7a50ac91a0e68e48b8a9e2e9f8cbd9cd4c0f9e9ef339082caa8b7d0fb34c643285fca2ec9eb0963936c61ad285727893e949f7c32449d5c8648549c9
@@ -0,0 +1,42 @@
1
+ name: Ruby Gem
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ build:
11
+ name: Build + Publish
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v2
16
+ - name: Set up Ruby 2.6
17
+ uses: actions/setup-ruby@v1
18
+ with:
19
+ ruby-version: 2.6.x
20
+
21
+ - name: Publish to GPR
22
+ run: |
23
+ mkdir -p $HOME/.gem
24
+ touch $HOME/.gem/credentials
25
+ chmod 0600 $HOME/.gem/credentials
26
+ printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
27
+ gem build *.gemspec
28
+ gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
29
+ env:
30
+ GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
31
+ OWNER: ${{ github.repository_owner }}
32
+
33
+ - name: Publish to RubyGems
34
+ run: |
35
+ mkdir -p $HOME/.gem
36
+ touch $HOME/.gem/credentials
37
+ chmod 0600 $HOME/.gem/credentials
38
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
39
+ gem build *.gemspec
40
+ gem push *.gem
41
+ env:
42
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
data/README.md CHANGED
@@ -1,40 +1,43 @@
1
1
  # Administrate::Field::Tinymce
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/administrate/field/tinymce`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ A plugin for adding [TinyMCE] support in [Administrate].
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
- ## Installation
5
+ ## Usage
8
6
 
9
- Add this line to your application's Gemfile:
7
+ Add [tinymce-rails] and administrate-field-tinymce to your `Gemfile`:
10
8
 
11
9
  ```ruby
12
- gem 'administrate-field-tinymce'
10
+ gem "tinymce-rails"
11
+ gem "administrate-field-tinymce", "~> 0.0.1"
13
12
  ```
14
13
 
15
- And then execute:
16
-
17
- $ bundle install
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install administrate-field-tinymce
22
-
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
14
+ Run:
28
15
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
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).
32
-
33
- ## Contributing
16
+ ```bash
17
+ $ bundle install
18
+ ```
34
19
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/administrate-field-tinymce.
20
+ Add require javascripts to your manifest.js
36
21
 
22
+ ```
23
+ //= link administrate-field-tinymce/application.js
24
+ ```
25
+
26
+
27
+ Add to your `FooDashboard`:
28
+ ```ruby
29
+ ATTRIBUTE_TYPES = [
30
+ bars: Field::Tinymce,
31
+ ]
32
+ ```
37
33
 
38
- ## License
34
+ Or with options:
35
+ ```ruby
36
+ ATTRIBUTE_TYPES = [
37
+ bars: Field::Tinymce.with_options(rows: 100, columns: 100),
38
+ ]
39
+ ```
39
40
 
40
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
41
+ [TinyMce]: https://github.com/tinymce/tinymce
42
+ [Administrate]: https://github.com/thoughtbot/administrate
43
+ [tinymce-rails]: https://github.com/spohlenz/tinymce-rails
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'administrate-field-tinymce'
3
- spec.version = '0.0.1'
3
+ spec.version = '1.0.0'
4
4
  spec.authors = ['Keshav Biswa']
5
5
  spec.email = ['keshavbiswa21@gmail.com']
6
6
 
@@ -22,6 +22,6 @@ Gem::Specification.new do |spec|
22
22
  spec.require_paths = ['lib']
23
23
 
24
24
  spec.add_runtime_dependency 'administrate', '< 1.0.0'
25
- spec.add_runtime_dependency 'rails', '>= 4.1'
26
- spec.add_runtime_dependency 'tinymce-rails', '>= 4.4.3'
25
+ spec.add_runtime_dependency 'rails', '~> 4.1'
26
+ spec.add_runtime_dependency 'tinymce-rails', '~> 4.4', '>= 4.4.3'
27
27
  end
@@ -3,5 +3,5 @@
3
3
  <%= f.label field.attribute %>
4
4
  </div>
5
5
  <div class="field-unit__field">
6
- <%= f.text_area field.attribute, class: "tinymce" %>
6
+ <%= f.text_area field.attribute, class: "tinymce", rows: field.rows, columns: field.columns %>
7
7
  </div>
@@ -11,6 +11,14 @@ module Administrate
11
11
  def to_s
12
12
  data
13
13
  end
14
+
15
+ def rows
16
+ options.fetch(:rows, 40)
17
+ end
18
+
19
+ def columns
20
+ options.fetch(:columns, 120)
21
+ end
14
22
  end
15
23
  end
16
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: administrate-field-tinymce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keshav Biswa
@@ -28,20 +28,23 @@ dependencies:
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '4.1'
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
40
  version: '4.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: tinymce-rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '4.4'
45
48
  - - ">="
46
49
  - !ruby/object:Gem::Version
47
50
  version: 4.4.3
@@ -49,6 +52,9 @@ dependencies:
49
52
  prerelease: false
50
53
  version_requirements: !ruby/object:Gem::Requirement
51
54
  requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '4.4'
52
58
  - - ">="
53
59
  - !ruby/object:Gem::Version
54
60
  version: 4.4.3
@@ -59,6 +65,7 @@ executables: []
59
65
  extensions: []
60
66
  extra_rdoc_files: []
61
67
  files:
68
+ - ".github/workflows/gem-push.yml"
62
69
  - ".gitignore"
63
70
  - ".rspec"
64
71
  - ".travis.yml"
@@ -96,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
103
  - !ruby/object:Gem::Version
97
104
  version: '0'
98
105
  requirements: []
99
- rubygems_version: 3.1.2
106
+ rubygems_version: 3.0.3
100
107
  signing_key:
101
108
  specification_version: 4
102
109
  summary: Administrate Plugin to add tinymce editor to administrate field.