jsoneditor-rails 1.0.3 → 2.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: 1b1f64b68e6fe24fd9e7b5cb600dd2289b8a05d14db957eb3844661c012e9d50
4
- data.tar.gz: d55f4e5c69896922118ec5072adfa9332f4c40cc41f35c2a0c8bd5064c332c5c
3
+ metadata.gz: 8c346657e7c60df6fc17cdcde26f0ec6d27674126f308237d0c3df796034a913
4
+ data.tar.gz: ccda6549013ba51e4a65d3ec0332b9704fcdc42ff1f27be8441e6d1a7c1cff70
5
5
  SHA512:
6
- metadata.gz: ff175b3f9a234a5016ef93e0a570bf41192ba517568cce22ccb478f1821b683dfa96e949665c11411b99526cd9e3dc4676e697030759df526ad7c63766d95351
7
- data.tar.gz: fc2923853f7dea9b731b3d01a4ba019e7e5d20edf172f879b12a9651477167544bf4997e4850cb0987f5a446fd3878e4ce164766432f20e4941df8588a184334
6
+ metadata.gz: dd6737e0ccf290fbec270718ef3339d1260320d77c7eb0ca055fac098f5db54ae612dad6e1ff963b896f9e3d7b915627e3a81edaa4db9d9e27907fe0b57ad8cf
7
+ data.tar.gz: 8134960eda063a7f6f6600b476869876e1b5db9de4d0c33d582dda2e4bd7506a2ac6d7fd99f926feab8b43c1fd8caa750c10fa9c14225e82187a328210a14a7f
@@ -0,0 +1,20 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "08:30"
8
+ timezone: America/New_York
9
+ open-pull-requests-limit: 99
10
+ reviewers:
11
+ - javierjulio
12
+ - package-ecosystem: github-actions
13
+ directory: "/"
14
+ schedule:
15
+ interval: daily
16
+ time: "08:30"
17
+ timezone: America/New_York
18
+ open-pull-requests-limit: 99
19
+ reviewers:
20
+ - javierjulio
@@ -0,0 +1,26 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ ruby: [ '3.0', '3.1', '3.2' ]
15
+ name: Ruby ${{ matrix.ruby }}
16
+ steps:
17
+ - uses: actions/checkout@v3
18
+ - uses: ruby/setup-ruby@v1
19
+ with:
20
+ ruby-version: ${{ matrix.ruby }}
21
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
22
+ - name: Run Tests
23
+ env:
24
+ RUBYOPT: "-W:deprecated"
25
+ run: |
26
+ bundle exec rake
data/.gitignore CHANGED
@@ -1,9 +1,9 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
7
6
  /pkg/
8
7
  /spec/reports/
9
8
  /tmp/
9
+ /test/dummy_assets/
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 2.0.0 (2023-06-13)
2
+
3
+ * Updated jsoneditor to version 9.10.2 ([#81](../../pull/81))
4
+
5
+ ## 1.0.4 (2020-12-23)
6
+
7
+ * No code changes - moved repository to Jackpocket organization and updated URLs
8
+
1
9
  ## 1.0.3 (2018-12-07)
2
10
 
3
11
  * Updated jsoneditor to version 5.26.3 ([#5](../../pull/5))
data/Gemfile.lock ADDED
@@ -0,0 +1,84 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ jsoneditor-rails (2.0.0)
5
+ railties (>= 3.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actionpack (7.0.5)
11
+ actionview (= 7.0.5)
12
+ activesupport (= 7.0.5)
13
+ rack (~> 2.0, >= 2.2.4)
14
+ rack-test (>= 0.6.3)
15
+ rails-dom-testing (~> 2.0)
16
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
17
+ actionview (7.0.5)
18
+ activesupport (= 7.0.5)
19
+ builder (~> 3.1)
20
+ erubi (~> 1.4)
21
+ rails-dom-testing (~> 2.0)
22
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
23
+ activesupport (7.0.5)
24
+ concurrent-ruby (~> 1.0, >= 1.0.2)
25
+ i18n (>= 1.6, < 2)
26
+ minitest (>= 5.1)
27
+ tzinfo (~> 2.0)
28
+ ansi (1.5.0)
29
+ builder (3.2.4)
30
+ concurrent-ruby (1.2.2)
31
+ crass (1.0.6)
32
+ erubi (1.12.0)
33
+ i18n (1.14.1)
34
+ concurrent-ruby (~> 1.0)
35
+ loofah (2.21.3)
36
+ crass (~> 1.0.2)
37
+ nokogiri (>= 1.12.0)
38
+ method_source (1.0.0)
39
+ mini_portile2 (2.8.2)
40
+ minitest (5.18.0)
41
+ minitest-reporters (1.6.0)
42
+ ansi
43
+ builder
44
+ minitest (>= 5.0)
45
+ ruby-progressbar
46
+ nokogiri (1.15.2)
47
+ mini_portile2 (~> 2.8.2)
48
+ racc (~> 1.4)
49
+ racc (1.7.0)
50
+ rack (2.2.7)
51
+ rack-test (2.1.0)
52
+ rack (>= 1.3)
53
+ rails-dom-testing (2.0.3)
54
+ activesupport (>= 4.2.0)
55
+ nokogiri (>= 1.6)
56
+ rails-html-sanitizer (1.6.0)
57
+ loofah (~> 2.21)
58
+ nokogiri (~> 1.14)
59
+ railties (7.0.5)
60
+ actionpack (= 7.0.5)
61
+ activesupport (= 7.0.5)
62
+ method_source
63
+ rake (>= 12.2)
64
+ thor (~> 1.0)
65
+ zeitwerk (~> 2.5)
66
+ rake (13.0.6)
67
+ ruby-progressbar (1.13.0)
68
+ thor (1.2.2)
69
+ tzinfo (2.0.6)
70
+ concurrent-ruby (~> 1.0)
71
+ zeitwerk (2.6.8)
72
+
73
+ PLATFORMS
74
+ ruby
75
+
76
+ DEPENDENCIES
77
+ bundler
78
+ jsoneditor-rails!
79
+ minitest
80
+ minitest-reporters
81
+ rake
82
+
83
+ BUNDLED WITH
84
+ 2.3.10
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # jsoneditor-rails
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/jsoneditor-rails.svg)](https://badge.fury.io/rb/jsoneditor-rails)
4
+ ![CI Build](https://github.com/jackpocket/jsoneditor-rails/workflows/CI%20Build/badge.svg)
5
+
3
6
  This gem packages the [JSON Editor](https://github.com/josdejong/jsoneditor) assets (JavaScripts, stylesheets, and images) for the Rails asset pipeline, so you don't have to download a package.
4
7
 
5
8
  ## Installation
@@ -37,14 +40,14 @@ Then add the JSON Editor CSS to your `app/assets/stylesheets/application.scss`:
37
40
 
38
41
  ## Development
39
42
 
40
- * `git clone https://github.com/javierjulio/jsoneditor-rails.git`
43
+ * `git clone https://github.com/jackpocket/jsoneditor-rails.git`
41
44
  * `bundle install`
42
- * `rake update_json_editor_assets`
45
+ * `rake update_assets`
43
46
  * Create pull request with latest changes
44
47
 
45
48
  ## Contributing
46
49
 
47
- Bug reports and pull requests are welcome on GitHub at https://github.com/javierjulio/jsoneditor-rails. 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.
50
+ Bug reports and pull requests are welcome on GitHub at https://github.com/jackpocket/jsoneditor-rails. 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.
48
51
 
49
52
  ## License
50
53
 
data/Rakefile CHANGED
@@ -7,29 +7,31 @@ Rake::TestTask.new(:test) do |t|
7
7
  t.test_files = FileList['test/**/*_test.rb']
8
8
  end
9
9
 
10
- task :default => :test
10
+ task default: :test
11
11
 
12
- desc "Update JSON Editor assets"
13
- task :update_json_editor_assets do
14
- dist_url = "https://raw.githubusercontent.com/josdejong/jsoneditor/master/dist/"
15
-
16
- puts "Downloading jsoneditor.js"
17
- puts `curl -o vendor/assets/javascripts/jsoneditor.js #{dist_url}jsoneditor.js`
18
- puts `curl -o vendor/assets/javascripts/jsoneditor.map #{dist_url}jsoneditor.map`
19
-
20
- puts "Downloading jsoneditor-minimalist.js"
21
- puts `curl -o vendor/assets/javascripts/jsoneditor-minimalist.js #{dist_url}jsoneditor-minimalist.js`
22
- puts `curl -o vendor/assets/javascripts/jsoneditor-minimalist.map #{dist_url}jsoneditor-minimalist.map`
12
+ # Use https://cdnjs.com/libraries/jsoneditor to view all files.
13
+ DIST_URL = "https://cdnjs.cloudflare.com/ajax/libs/jsoneditor/9.10.2/"
23
14
 
24
- puts "Downloading jsoneditor-icons.svg"
25
- puts `curl -o vendor/assets/images/jsoneditor-icons.svg #{dist_url}img/jsoneditor-icons.svg`
15
+ ASSETS_PATH = ENV['ASSETS_PATH'] || 'vendor/assets/'
26
16
 
27
- puts "Downloading jsoneditor.css"
28
- puts `curl -o vendor/assets/stylesheets/jsoneditor.scss #{dist_url}jsoneditor.css`
17
+ def update_asset_files
18
+ system "curl -o #{ASSETS_PATH}javascripts/jsoneditor.js #{DIST_URL}jsoneditor.js"
19
+ system "curl -o #{ASSETS_PATH}javascripts/jsoneditor.map #{DIST_URL}jsoneditor.map"
20
+ system "curl -o #{ASSETS_PATH}javascripts/jsoneditor-minimalist.js #{DIST_URL}jsoneditor-minimalist.js"
21
+ system "curl -o #{ASSETS_PATH}javascripts/jsoneditor-minimalist.map #{DIST_URL}jsoneditor-minimalist.map"
22
+ system "curl -o #{ASSETS_PATH}images/jsoneditor-icons.svg #{DIST_URL}img/jsoneditor-icons.svg"
23
+ system "curl -o #{ASSETS_PATH}stylesheets/jsoneditor.scss #{DIST_URL}jsoneditor.css"
24
+ end
29
25
 
30
- css = File.read('vendor/assets/stylesheets/jsoneditor.scss')
31
- content = css.gsub(/url\("img\//, 'asset-url("')
32
- File.open('vendor/assets/stylesheets/jsoneditor.scss', 'w') { |f| f.write(content) }
26
+ def use_asset_url_for_css_images
27
+ path = "#{ASSETS_PATH}stylesheets/jsoneditor.scss"
28
+ modified_css = File.read(path).gsub(/url\("\.\/img\//, 'asset-url("')
29
+ File.open(path, 'w') { |f| f.write(modified_css) }
30
+ end
33
31
 
34
- puts "\e[32mDone!\e[0m"
32
+ desc "Update JSON Editor assets"
33
+ task :update_assets do
34
+ update_asset_files
35
+ use_asset_url_for_css_images
36
+ puts "\e[32mAll assets have been updated.\e[0m"
35
37
  end
@@ -7,11 +7,11 @@ Gem::Specification.new do |spec|
7
7
  spec.name = "jsoneditor-rails"
8
8
  spec.version = Jsoneditor::Rails::VERSION
9
9
  spec.authors = ["Javier Julio"]
10
- spec.email = ["jjfutbol@gmail.com"]
10
+ spec.email = ["javier@jackpocket.com"]
11
11
 
12
12
  spec.summary = "Use JSON Editor with Rails 4+"
13
13
  spec.description = "This gem provides JSON Editor for your Rails 4+ application."
14
- spec.homepage = "https://github.com/javierjulio/jsoneditor-rails"
14
+ spec.homepage = "https://github.com/jackpocket/jsoneditor-rails"
15
15
  spec.license = "MIT"
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
@@ -21,9 +21,10 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ["lib"]
23
23
 
24
- spec.add_runtime_dependency "sass-rails"
24
+ spec.add_runtime_dependency "railties", ">= 3.0"
25
25
 
26
- spec.add_development_dependency "bundler", "~> 1.14"
27
- spec.add_development_dependency "rake", "~> 10.0"
28
- spec.add_development_dependency "minitest", "~> 5.0"
26
+ spec.add_development_dependency "bundler"
27
+ spec.add_development_dependency "rake"
28
+ spec.add_development_dependency "minitest"
29
+ spec.add_development_dependency "minitest-reporters"
29
30
  end
@@ -1,5 +1,5 @@
1
1
  module Jsoneditor
2
2
  module Rails
3
- VERSION = "1.0.3"
3
+ VERSION = "2.0.0"
4
4
  end
5
5
  end
@@ -43,8 +43,8 @@
43
43
  id="namedview4144"
44
44
  showgrid="true"
45
45
  inkscape:zoom="4"
46
- inkscape:cx="101.95756"
47
- inkscape:cy="63.092516"
46
+ inkscape:cx="13.229181"
47
+ inkscape:cy="119.82429"
48
48
  inkscape:window-x="0"
49
49
  inkscape:window-y="0"
50
50
  inkscape:window-maximized="1"
@@ -733,4 +733,17 @@
733
733
  id="path3546-2-2"
734
734
  inkscape:connector-curvature="0"
735
735
  sodipodi:nodetypes="cccccccc" />
736
+ <rect
737
+ style="fill:#4c4c4c;fill-opacity:1;stroke:none;stroke-width:0"
738
+ id="svg_1-3"
739
+ height="16"
740
+ width="16"
741
+ y="28"
742
+ x="4" />
743
+ <path
744
+ sodipodi:nodetypes="ccccccccc"
745
+ inkscape:connector-curvature="0"
746
+ id="path4402-5-7"
747
+ d="m 15,41 0,-7 -4,0 0,3 -5,-4 5,-4 0,3 6,0 0,9"
748
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.68465352px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
736
749
  </svg>