rf-stylez 0.5.1 → 0.6.0
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.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/bin/rf-stylez +12 -0
- data/lib/rf/stylez.rb +2 -1
- data/lib/rf/stylez/update_check.rb +35 -0
- data/lib/rf/stylez/version.rb +1 -1
- data/rf-stylez.gemspec +3 -2
- metadata +21 -5
- data/bin/console +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0abe4bfb5bfa4175b31db9323be543f9402ef099f53de187cfc252b1fd1a12fb
|
4
|
+
data.tar.gz: 912f789134476f09a05c0edb61a4bd291c3a4181f21e53af3fd2867d8b4ec9a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 539666d12a256369a1e3c06f483c94a2ade409d788fc6558eeee0b7eecdab2356c57e1c984a606382ef8a982a12a5958dabc299d3b541f718ebb8e6112403e02
|
7
|
+
data.tar.gz: 8a4956414ac36eb1744e06cdd67f382837fe13ca715b92777ee51fb913ab4f292567c166c8a2a6f1d38526ccdc3a6d5a87fa387f97c5bfd7a9e3f282efeec24b
|
data/README.md
CHANGED
data/bin/rf-stylez
ADDED
data/lib/rf/stylez.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'rf/stylez/version'
|
4
|
+
require 'rf/stylez/update_check'
|
5
|
+
require 'rubocop'
|
4
6
|
require 'rubocop/cop/lint/no_env'
|
5
7
|
require 'rubocop/cop/lint/no_json'
|
6
8
|
require 'rubocop/cop/lint/no_http_party'
|
@@ -11,6 +13,5 @@ require 'rubocop/cop/lint/no_untyped_raise'
|
|
11
13
|
|
12
14
|
module Rf
|
13
15
|
module Stylez
|
14
|
-
# Your code goes here...
|
15
16
|
end
|
16
17
|
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'json'
|
4
|
+
require 'net/http'
|
5
|
+
require 'logger'
|
6
|
+
|
7
|
+
require 'semantic_versioning'
|
8
|
+
|
9
|
+
module Rf
|
10
|
+
module Stylez
|
11
|
+
module UpdateCheck
|
12
|
+
RUBYGEMS_URL = URI('https://rubygems.org/api/v1/gems/rf-stylez.json').freeze
|
13
|
+
|
14
|
+
def self.check
|
15
|
+
logger = Logger.new(STDOUT)
|
16
|
+
current_version = SemanticVersioning::Version.new(VERSION)
|
17
|
+
|
18
|
+
remote_version = SemanticVersioning::Version.new(
|
19
|
+
JSON.parse(Net::HTTP.get(RUBYGEMS_URL))['version']
|
20
|
+
)
|
21
|
+
if current_version >= remote_version
|
22
|
+
logger.info('You are running latest rf-stylez ')
|
23
|
+
logger.info('(•_•) ( •_•)>⌐■-■ (⌐■_■)')
|
24
|
+
else
|
25
|
+
logger.warn('RF Stylez is out of date!')
|
26
|
+
logger.warn("Newest version is: #{remote_version}")
|
27
|
+
logger.warn("You are running: #{current_version}")
|
28
|
+
logger.warn('Please update: `gem update rf-stylez`')
|
29
|
+
end
|
30
|
+
rescue SocketError
|
31
|
+
logger.info('Offline, cannot check for rf-stylez updates')
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/lib/rf/stylez/version.rb
CHANGED
data/rf-stylez.gemspec
CHANGED
@@ -15,12 +15,13 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.homepage = 'https://github.com/rainforestapp/rf-stylez'
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
-
spec.bindir = '
|
19
|
-
spec.executables =
|
18
|
+
spec.bindir = 'bin'
|
19
|
+
spec.executables = ['rf-stylez']
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
22
|
spec.add_runtime_dependency 'rubocop', '>= 0.59', '< 0.81'
|
23
23
|
spec.add_runtime_dependency 'rubocop-rails', '~> 2.5.0'
|
24
|
+
spec.add_runtime_dependency 'semantic_versioning', '~> 0.2'
|
24
25
|
|
25
26
|
spec.add_development_dependency 'bundler', '~> 1.10'
|
26
27
|
spec.add_development_dependency 'rake', '~> 13.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rf-stylez
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emanuel Evans
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -44,6 +44,20 @@ dependencies:
|
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 2.5.0
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: semantic_versioning
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0.2'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0.2'
|
47
61
|
- !ruby/object:Gem::Dependency
|
48
62
|
name: bundler
|
49
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -117,7 +131,8 @@ dependencies:
|
|
117
131
|
description: Configurations for Rubocop and other style enforcers/linters
|
118
132
|
email:
|
119
133
|
- emanuel@rainforestqa.com
|
120
|
-
executables:
|
134
|
+
executables:
|
135
|
+
- rf-stylez
|
121
136
|
extensions: []
|
122
137
|
extra_rdoc_files: []
|
123
138
|
files:
|
@@ -130,9 +145,10 @@ files:
|
|
130
145
|
- LICENSE
|
131
146
|
- README.md
|
132
147
|
- Rakefile
|
133
|
-
- bin/
|
148
|
+
- bin/rf-stylez
|
134
149
|
- bin/setup
|
135
150
|
- lib/rf/stylez.rb
|
151
|
+
- lib/rf/stylez/update_check.rb
|
136
152
|
- lib/rf/stylez/version.rb
|
137
153
|
- lib/rubocop/cop/lint/no_bang_state_machine_events.rb
|
138
154
|
- lib/rubocop/cop/lint/no_env.rb
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "rf/stylez"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start
|