html-pipeline-negarmoji 0.1.2 → 0.1.6

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: 3a2153e1194509e9c58ec81b7860c407947f38ed692e98e18d40f1b3e7fd4824
4
- data.tar.gz: 3a0b75a0ac746837bd3e3cdaa0e7bf4eced30d15ab973da900bb50934dddca15
3
+ metadata.gz: b80bef67ffd4723d2bd36285e75ca50f5bad05b92a623d9f11984c1a52159b7d
4
+ data.tar.gz: 6a13e32969a95bd246178695378ea0b1926df55e4f9afc73231bdb2f4efaa66a
5
5
  SHA512:
6
- metadata.gz: e64caa075cf1f818fead2825cf60e4f864566dd49fbe04eb34e3c0bfa0db1085f531e006f4df130264bda778e7357563a529e18c1e85c51f6dda01cc0637b64d
7
- data.tar.gz: 5cb11e4ecadf35f442f50d4a8da881ede6b68536936cddfa71c209e1a6d720c999d16e748d8003233f3283306a5812e09f0ff0c2a77af1a4537c4549fd1ca95a
6
+ metadata.gz: 133aad9ae920f33d75fe8c1f81efe5b7234fcff97f33a483b2e7365573d78e62fbbf6926e76f3bae5d855064ae6384a95e10128da58d4997c4e4eeefac74e600
7
+ data.tar.gz: 9e88ec4538e7788e81090404e50cb1c7e7ae4da71030a194c087127e14a0e264aa4a85c157252db3093be0feb7b92c730220e76385aa7aa6e49c66453184ad51
data/.gitlab-ci.yml CHANGED
@@ -10,112 +10,98 @@ default:
10
10
  paths:
11
11
  - vendor/
12
12
 
13
- # job for testing package against ruby version 2.6
13
+ # job for testing package against default ruby version
14
14
  # on master branch and send test coverage result to
15
15
  # codeclimate.
16
- test main branch:
16
+ test master branch defaut:
17
17
  stage: test
18
18
  before_script:
19
- # setup rvm.
19
+ # setup rbenv.
20
20
  - source ~/.bash_profile
21
- # use ruby version 2.6.
22
- - rvm use 2.6
23
- # upgrade bundler to latest version.
24
- - gem install bundler
21
+ # use default ruby version.
22
+ - rbenv global 3.0.0
25
23
  # install dependency gems.
26
- - bundle install --path vendor
24
+ - bundle config set path 'vendor'
25
+ - bundle install
27
26
  # run codeclimate test reporter agent.
28
27
  - cc-test-reporter before-build
29
28
  # run tests.
30
29
  script:
31
- - script/test.sh
30
+ - cd script && ./test.sh
32
31
  # send test coverage result to codeclimate.
33
32
  after_script:
34
33
  - cc-test-reporter after-build --coverage-input-type simplecov
35
34
  only:
36
35
  - master
37
36
 
38
- # job for testing package on other branches than master
39
- # and merge requests against 2.6 version.
40
- test ruby 2.6:
37
+ # job for testing package on mon master branch
38
+ # and merge requests against other ruby versions.
39
+ test master branch ruby 2.7.2:
41
40
  stage: test
42
41
  before_script:
43
- # setup rvm.
42
+ # setup rbenv.
44
43
  - source ~/.bash_profile
45
- # use ruby version 2.6.
46
- - rvm use 2.6
47
- # upgrade bundler to latest version.
48
- - gem install bundler
44
+ # use custom ruby version.
45
+ - rbenv global 2.7.2
49
46
  # install dependency gems.
50
- - bundle install --path vendor
47
+ - bundle config set path 'vendor'
48
+ - bundle install
51
49
  # run tests.
52
50
  script:
53
- - script/test.sh
51
+ - cd script && ./test.sh
54
52
  only:
55
- - branches
56
- - merge_requests
57
- except:
58
53
  - master
59
54
 
60
- test ruby 2.5:
61
- stage: test
62
- before_script:
63
- # setup rvm.
64
- - source ~/.bash_profile
65
- # use ruby version 2.5.
66
- - rvm use 2.5
67
- # upgrade bundler to latest version.
68
- - gem install bundler
69
- # install dependency gems.
70
- - bundle install --path vendor
71
- # run tests.
72
- script:
73
- - script/test.sh
74
- except:
75
- - tags
76
-
77
- test ruby 2.4:
55
+ # job for testing package on other branches than master
56
+ # and merge requests against default version.
57
+ test branch ruby default:
78
58
  stage: test
79
59
  before_script:
80
- # setup rvm.
60
+ # setup rbenv.
81
61
  - source ~/.bash_profile
82
- # use ruby version 2.4.
83
- - rvm use 2.4
84
- # upgrade bundler to latest version.
85
- - gem install bundler
62
+ # use default ruby version.
63
+ - rbenv global 3.0.0
86
64
  # install dependency gems.
87
- - bundle install --path vendor
65
+ - bundle config set path 'vendor'
66
+ - bundle install
88
67
  # run tests.
89
68
  script:
90
- - script/test.sh
69
+ - cd script && ./test.sh
70
+ only:
71
+ - branches
72
+ - merge_requests
91
73
  except:
92
- - tags
74
+ - master
93
75
 
94
- test ruby 2.3:
76
+ # job for testing package on other branches than master
77
+ # and merge requests against other ruby versions.
78
+ test branch ruby 2.7.2:
95
79
  stage: test
96
80
  before_script:
97
- # setup rvm.
81
+ # setup rbenv.
98
82
  - source ~/.bash_profile
99
- # use ruby version 2.3.
100
- - rvm use 2.3
101
- # upgrade bundler to latest version.
102
- - gem install bundler
83
+ # use custom ruby version.
84
+ - rbenv global 2.7.2
103
85
  # install dependency gems.
104
- - bundle install --path vendor
86
+ - bundle config set path 'vendor'
87
+ - bundle install
105
88
  # run tests.
106
89
  script:
107
- - script/test.sh
90
+ - cd script && ./test.sh
91
+ only:
92
+ - branches
93
+ - merge_requests
108
94
  except:
109
- - tags
95
+ - master
110
96
 
111
97
  # deploy gems to rubygems.org whenever a tag is released.
112
98
  release to rubygems:
113
99
  stage: release
114
100
  script:
115
- # setup rvm.
101
+ # setup rbenv.
116
102
  - source ~/.bash_profile
117
- # use ruby version 2.6.
118
- - rvm use 2.6
103
+ # use default ruby version.
104
+ - rbenv global 3.0.0
119
105
  # create rubygems credential file for auto login.
120
106
  - script/ci_rubygems.sh
121
107
  # extract tag from git log and strip "v".
data/.rubocop.yml CHANGED
@@ -1,7 +1,9 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
3
  AllCops:
4
- TargetRubyVersion: 2.3
4
+ TargetRubyVersion: 2.7.2
5
+ NewCops: disable
6
+ SuggestExtensions: false
5
7
  Exclude:
6
8
  - vendor/**/*
7
9
  - test/**/*
@@ -9,10 +11,12 @@ AllCops:
9
11
  - Rakefile
10
12
  - ./*.gemspec
11
13
 
12
-
13
- Layout/AlignHash:
14
+ Layout/HashAlignment:
14
15
  EnforcedHashRocketStyle: table
15
16
 
17
+ Layout/LineLength:
18
+ Max: 85
19
+
16
20
  Layout/MultilineMethodCallIndentation:
17
21
  EnforcedStyle: indented_relative_to_receiver
18
22
  IndentationWidth: 2
@@ -26,9 +30,6 @@ Metrics/BlockLength:
26
30
  Metrics/CyclomaticComplexity:
27
31
  Max: 10
28
32
 
29
- Metrics/LineLength:
30
- Max: 85
31
-
32
33
  Metrics/MethodLength:
33
34
  Max: 40
34
35
 
@@ -22,14 +22,14 @@ Gem::Specification.new do |spec|
22
22
  spec.test_files = spec.files.grep(%r!^test/!)
23
23
  spec.require_paths = ["lib"]
24
24
 
25
- spec.required_ruby_version = ">= 2.3.0"
25
+ spec.required_ruby_version = ">= 2.7.2"
26
26
 
27
- spec.add_dependency "html-pipeline", "~> 2.12"
28
- spec.add_dependency "negarmoji", "~> 0.1.5"
27
+ spec.add_dependency "html-pipeline", "~> 2.14"
28
+ spec.add_dependency "negarmoji", "~> 0.1.10"
29
29
 
30
- spec.add_development_dependency "bundler", "~> 2.0"
31
- spec.add_development_dependency "rake", "~> 13.0"
32
- spec.add_development_dependency "rspec", "~> 3.0"
33
- spec.add_development_dependency "rubocop-jekyll", "~> 0.10"
34
- spec.add_development_dependency "simplecov", "~> 0.17.0"
30
+ spec.add_development_dependency "bundler", "~> 2.2.3"
31
+ spec.add_development_dependency "rake", "~> 13.0.6"
32
+ spec.add_development_dependency "rspec", "~> 3.10"
33
+ spec.add_development_dependency "rubocop", "~> 1.18.3"
34
+ spec.add_development_dependency "simplecov", "~> 0.21.2"
35
35
  end
@@ -3,7 +3,7 @@
3
3
  module Html
4
4
  module Pipeline
5
5
  module NegarMojiHtmlPipeline
6
- VERSION = "0.1.2"
6
+ VERSION = "0.1.6"
7
7
  end
8
8
  end
9
9
  end
@@ -7,7 +7,7 @@
7
7
  # -e Exit immediately if a command exits with a non-zero status.
8
8
  set -e
9
9
 
10
- mkdir -p ~/.gem
10
+ mkdir --parents ~/.gem
11
11
  touch ~/.gem/credentials
12
12
  chmod 0600 ~/.gem/credentials
13
13
  printf -- "---\r\n:rubygems_api_key: %s\n" "${RUBYGEMS_API_KEY}" > ~/.gem/credentials
@@ -4,6 +4,8 @@
4
4
  import os
5
5
  import subprocess
6
6
 
7
+ package_name = "AzadehAfzar Negareh Emoji HTML Pipeline"
8
+
7
9
  # get path to this file's directory, then go one directory up.
8
10
  file_path = os.path.abspath(os.path.dirname(__file__))
9
11
  base_path = os.path.abspath(os.path.dirname(file_path))
@@ -34,10 +36,10 @@ for line in version_file:
34
36
  if not version or not version_info:
35
37
  raise ValueError("ERROR: version not found at version.rb.")
36
38
 
37
- print("This program will tag a new release of Negareh Emoji HTML Pipeline\n"
39
+ print(f"This program will tag a new release of {package_name}\n"
38
40
  + "and it will push to gitlab and github for building,\n"
39
41
  + "gitlab will push a built gem to rubygems.org.\n\n"
40
- + f"current version is {version}\n\n")
42
+ + f"current version is {version}\n")
41
43
 
42
44
  # read and convert to integer.
43
45
  print("Version is in X.Y.Z form.\n"
@@ -63,7 +65,6 @@ elif new_minor > version_info[1]:
63
65
  elif new_patch < version_info[2]:
64
66
  raise ValueError("Patch version can't be less than current version!")
65
67
 
66
-
67
68
  # creat an empty list for new version.rb file
68
69
  print("Writing new version. \n\n")
69
70
 
@@ -89,7 +90,7 @@ with open(version_file_path, "w+") as file:
89
90
  # do git commit and tag and push to upstreams
90
91
  print("Commit and Tag and Push to upstream. \n\n")
91
92
 
92
- subprocess.call(f"git commit \"{version_file_path}\" -m \"version: Negareh Emoji HTML Pipeline v{new_version}\"", shell=True)
93
- subprocess.call(f"git tag \"v{new_version}\"", shell=True)
93
+ subprocess.call(f"git commit \"{version_file_path}\" --sign --message \"version: {package_name} v{new_version}\"", shell=True)
94
+ subprocess.call(f"git tag --annotate --sign --message \"new {package_name} version {new_version}\" \"v{new_version}\"", shell=True)
94
95
  subprocess.call(f"git push origin HEAD \"v{new_version}\"", shell=True)
95
96
  subprocess.call(f"git push github HEAD \"v{new_version}\"", shell=True)
data/script/test.sh CHANGED
@@ -6,7 +6,14 @@
6
6
  # set flag for shell execution.
7
7
  # -e Exit immediately if a command exits with a non-zero status.
8
8
  # -x Print commands and their arguments as they are executed.
9
- set -ex
9
+ set -e
10
10
 
11
- script/test_style.sh
12
- # script/test_module.sh # TODO write tests
11
+ # files for testing.
12
+ NEGAR_PIP_RB="../lib/html/pipeline/negarmoji-pipeline.rb"
13
+ FILTER_RB="../lib/html/pipeline/negarmoji-pipeline/filter.rb"
14
+ VERSION_RB="../lib/html/pipeline/negarmoji-pipeline/version.rb"
15
+
16
+ ./test_style.sh "${NEGAR_PIP_RB}" "${FILTER_RB}" "${VERSION_RB}"
17
+
18
+ # TODO write tests first :)
19
+ # ./test_module.sh "${NEGAR_PIP_RB}" "${FILTER_RB}" "${VERSION_RB}"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-pipeline-negarmoji
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mohammad Mahdi Baghbani Pourvahid
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-27 00:00:00.000000000 Z
11
+ date: 2021-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: html-pipeline
@@ -16,98 +16,98 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.12'
19
+ version: '2.14'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.12'
26
+ version: '2.14'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: negarmoji
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.1.5
33
+ version: 0.1.10
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: 0.1.5
40
+ version: 0.1.10
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.0'
47
+ version: 2.2.3
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2.0'
54
+ version: 2.2.3
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '13.0'
61
+ version: 13.0.6
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '13.0'
68
+ version: 13.0.6
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '3.0'
75
+ version: '3.10'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '3.0'
82
+ version: '3.10'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rubocop-jekyll
84
+ name: rubocop
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0.10'
89
+ version: 1.18.3
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0.10'
96
+ version: 1.18.3
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: simplecov
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 0.17.0
103
+ version: 0.21.2
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 0.17.0
110
+ version: 0.21.2
111
111
  description: |-
112
112
  Negareh emoji library is an emoji filter plugin for html pipeline,
113
113
  this package is more flexible and customizable then the default
@@ -154,14 +154,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
154
154
  requirements:
155
155
  - - ">="
156
156
  - !ruby/object:Gem::Version
157
- version: 2.3.0
157
+ version: 2.7.2
158
158
  required_rubygems_version: !ruby/object:Gem::Requirement
159
159
  requirements:
160
160
  - - ">="
161
161
  - !ruby/object:Gem::Version
162
162
  version: '0'
163
163
  requirements: []
164
- rubygems_version: 3.0.3
164
+ rubygems_version: 3.2.3
165
165
  signing_key:
166
166
  specification_version: 4
167
167
  summary: Negareh emoji html pipeline