html-pipeline-negarmoji 0.1.5 → 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: 07ae32eb944002e2e0fe6c020158407fb41bcb4e2614f0a3f343aca86fb78541
4
- data.tar.gz: 6fd33436fcf65f0eaf15b09d5b4a6cbea85f2a7ed3f3d4ba588d8d375c8febff
3
+ metadata.gz: b80bef67ffd4723d2bd36285e75ca50f5bad05b92a623d9f11984c1a52159b7d
4
+ data.tar.gz: 6a13e32969a95bd246178695378ea0b1926df55e4f9afc73231bdb2f4efaa66a
5
5
  SHA512:
6
- metadata.gz: 7a271d39d1afafb2c34a0d2d853dc6dafe6717cb868a7b1d814405a62d39bcdfffd52a47db47e3ced65ace644f68f82b91c7708d0f1676bae474b881f78f7f74
7
- data.tar.gz: 3a66a3f9196dae877f1a37234b3a0346a37f99225da1267248f9541aa326030b0cc1d6834c70556e6261b2b706cd522e965fe4d8e1d059f4f7f5959aa5ddd967
6
+ metadata.gz: 133aad9ae920f33d75fe8c1f81efe5b7234fcff97f33a483b2e7365573d78e62fbbf6926e76f3bae5d855064ae6384a95e10128da58d4997c4e4eeefac74e600
7
+ data.tar.gz: 9e88ec4538e7788e81090404e50cb1c7e7ae4da71030a194c087127e14a0e264aa4a85c157252db3093be0feb7b92c730220e76385aa7aa6e49c66453184ad51
data/.gitlab-ci.yml CHANGED
@@ -10,79 +10,89 @@ 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
19
  # setup rbenv.
20
20
  - source ~/.bash_profile
21
- # use ruby version 2.7.0 .
22
- - rbenv global 2.7.0
21
+ # use default ruby version.
22
+ - rbenv global 3.0.0
23
23
  # install dependency gems.
24
- - bundle install --path vendor
24
+ - bundle config set path 'vendor'
25
+ - bundle install
25
26
  # run codeclimate test reporter agent.
26
27
  - cc-test-reporter before-build
27
28
  # run tests.
28
29
  script:
29
- - script/test.sh
30
+ - cd script && ./test.sh
30
31
  # send test coverage result to codeclimate.
31
32
  after_script:
32
33
  - cc-test-reporter after-build --coverage-input-type simplecov
33
34
  only:
34
35
  - master
35
36
 
36
- # job for testing package on other branches than master
37
- # and merge requests against 2.7.0 version.
38
- test ruby 2.7.0:
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:
39
40
  stage: test
40
41
  before_script:
41
42
  # setup rbenv.
42
43
  - source ~/.bash_profile
43
- # use ruby version 2.7.0 .
44
- - rbenv global 2.7.0
44
+ # use custom ruby version.
45
+ - rbenv global 2.7.2
45
46
  # install dependency gems.
46
- - bundle install --path vendor
47
+ - bundle config set path 'vendor'
48
+ - bundle install
47
49
  # run tests.
48
50
  script:
49
- - script/test.sh
51
+ - cd script && ./test.sh
50
52
  only:
51
- - branches
52
- - merge_requests
53
- except:
54
53
  - master
55
54
 
56
- # jobs for testing package against older ruby versions.
57
- test ruby 2.6.5:
55
+ # job for testing package on other branches than master
56
+ # and merge requests against default version.
57
+ test branch ruby default:
58
58
  stage: test
59
59
  before_script:
60
60
  # setup rbenv.
61
61
  - source ~/.bash_profile
62
- # use ruby version 2.6.5 .
63
- - rbenv global 2.6.5
62
+ # use default ruby version.
63
+ - rbenv global 3.0.0
64
64
  # install dependency gems.
65
- - bundle install --path vendor
65
+ - bundle config set path 'vendor'
66
+ - bundle install
66
67
  # run tests.
67
68
  script:
68
- - script/test.sh
69
+ - cd script && ./test.sh
70
+ only:
71
+ - branches
72
+ - merge_requests
69
73
  except:
70
- - tags
74
+ - master
71
75
 
72
- test ruby 2.5.7:
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:
73
79
  stage: test
74
80
  before_script:
75
81
  # setup rbenv.
76
82
  - source ~/.bash_profile
77
- # use ruby version 2.5.7 .
78
- - rbenv global 2.5.7
83
+ # use custom ruby version.
84
+ - rbenv global 2.7.2
79
85
  # install dependency gems.
80
- - bundle install --path vendor
86
+ - bundle config set path 'vendor'
87
+ - bundle install
81
88
  # run tests.
82
89
  script:
83
- - script/test.sh
90
+ - cd script && ./test.sh
91
+ only:
92
+ - branches
93
+ - merge_requests
84
94
  except:
85
- - tags
95
+ - master
86
96
 
87
97
  # deploy gems to rubygems.org whenever a tag is released.
88
98
  release to rubygems:
@@ -90,8 +100,8 @@ release to rubygems:
90
100
  script:
91
101
  # setup rbenv.
92
102
  - source ~/.bash_profile
93
- # use ruby version 2.7.0
94
- - rbenv global 2.7.0
103
+ # use default ruby version.
104
+ - rbenv global 3.0.0
95
105
  # create rubygems credential file for auto login.
96
106
  - script/ci_rubygems.sh
97
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
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.9"
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.5"
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.5
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: 2020-04-20 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.9
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.9
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.1.2
164
+ rubygems_version: 3.2.3
165
165
  signing_key:
166
166
  specification_version: 4
167
167
  summary: Negareh emoji html pipeline