html-pipeline-negarmoji 0.0.4 → 0.1.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: 213a37f5979e92b48d06df671693a02ba6ea87df6d77db8959c33752bfd093d9
4
- data.tar.gz: 88fa3de77bdbb092f2b272c8dcb62d081fce0f3286f302971e2cb6a6c96ae6ff
3
+ metadata.gz: 90dd4cfa20cd8c8b53cab868b926af66047c87eb4677cd1b81c781845b4db594
4
+ data.tar.gz: 15bd9e5036ee896f3939df80b8496fc4212a717c43c9ec2da34795300e2432f7
5
5
  SHA512:
6
- metadata.gz: 6c4bf1dc1c6a321b44eac7ab2e18b0b1eb4907baf9d0bdd94923ca45a1dd9e3dfdcb1459c728d022dc6dad8feca1d5bf8c86d878872803e10d4383ae57485e3d
7
- data.tar.gz: 6348597c12f092971da8cf3c7f67a3ed7487484b9b91fd26667eb38485ef1568202b08e10b661ae5b864a01c0566d3ce12f2cdf522c901ef88ba1ae6de5ea48e
6
+ metadata.gz: a62779edea9377f91b83e0db17160369689d913f57c86af116ffaa489c0aaee0f549c855aa3f67520a7f0dfddb7514ae191cbef38c15066e562ebba1a27f299d
7
+ data.tar.gz: e00bb9dd3ffe1935f74d05e50314562c3882dea1eb96b1e8b8fe5d685d40c13b938cc0325d30b252a6144625425cb0daab2a15336aa978c75fc8b59f7a20dd1b
data/.codeclimate.yml ADDED
@@ -0,0 +1,64 @@
1
+ version: "2"
2
+ checks:
3
+ argument-count:
4
+ enabled: true
5
+ config:
6
+ threshold: 5
7
+ complex-logic:
8
+ enabled: true
9
+ config:
10
+ threshold: 5
11
+ file-lines:
12
+ enabled: true
13
+ config:
14
+ threshold: 350
15
+ method-complexity:
16
+ enabled: true
17
+ config:
18
+ threshold: 10
19
+ method-count:
20
+ enabled: true
21
+ config:
22
+ threshold: 20
23
+ method-lines:
24
+ enabled: true
25
+ config:
26
+ threshold: 30
27
+ nested-control-flow:
28
+ enabled: true
29
+ config:
30
+ threshold: 5
31
+ return-statements:
32
+ enabled: true
33
+ config:
34
+ threshold: 4
35
+ similar-code:
36
+ enabled: true
37
+ config:
38
+ threshold: #language-specific defaults. overrides affect all languages.
39
+ identical-code:
40
+ enabled: true
41
+ config:
42
+ threshold: #language-specific defaults. overrides affect all languages.
43
+ plugins:
44
+ git-legal:
45
+ enabled: true
46
+ config:
47
+ allow_affero_copyleft: true
48
+ allow_strong_copyleft: true
49
+ rubocop:
50
+ enabled: true
51
+
52
+ exclude_patterns:
53
+ - "config/"
54
+ - "db/"
55
+ - "dist/"
56
+ - "features/"
57
+ - "images/"
58
+ - "**/node_modules/"
59
+ - "script/"
60
+ - "**/spec/"
61
+ - "**/test/"
62
+ - "**/tests/"
63
+ - "**/vendor/"
64
+ - "**/*.d.ts"
data/.gitlab-ci.yml ADDED
@@ -0,0 +1,124 @@
1
+ # stages of gitlab ci.
2
+ stages:
3
+ - test
4
+ - release
5
+
6
+ # default settings for all ci jobs.
7
+ default:
8
+ image: azadehafzarhub/gitlab-ci-ruby-build:latest
9
+ cache:
10
+ paths:
11
+ - vendor/
12
+
13
+ # job for testing package against ruby version 2.6
14
+ # on master branch and send test coverage result to
15
+ # codeclimate.
16
+ test main branch:
17
+ stage: test
18
+ before_script:
19
+ # setup rvm.
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
25
+ # install dependency gems.
26
+ - bundle install --path vendor
27
+ # run codeclimate test reporter agent.
28
+ - cc-test-reporter before-build
29
+ # run tests.
30
+ script:
31
+ - script/test.sh
32
+ # send test coverage result to codeclimate.
33
+ after_script:
34
+ - cc-test-reporter after-build --coverage-input-type simplecov
35
+ only:
36
+ - master
37
+
38
+ # job for testing package on other branches than master
39
+ # and merge requests against 2.6 version.
40
+ test ruby 2.6:
41
+ stage: test
42
+ before_script:
43
+ # setup rvm.
44
+ - source ~/.bash_profile
45
+ # use ruby version 2.6.
46
+ - rvm use 2.6
47
+ # upgrade bundler to latest version.
48
+ - gem install bundler
49
+ # install dependency gems.
50
+ - bundle install --path vendor
51
+ # run tests.
52
+ script:
53
+ - script/test.sh
54
+ only:
55
+ - branches
56
+ - merge_requests
57
+ except:
58
+ - master
59
+
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
+
75
+ test ruby 2.4:
76
+ stage: test
77
+ before_script:
78
+ # setup rvm.
79
+ - source ~/.bash_profile
80
+ # use ruby version 2.4.
81
+ - rvm use 2.4
82
+ # upgrade bundler to latest version.
83
+ - gem install bundler
84
+ # install dependency gems.
85
+ - bundle install --path vendor
86
+ # run tests.
87
+ script:
88
+ - script/test.sh
89
+
90
+ test ruby 2.3:
91
+ stage: test
92
+ before_script:
93
+ # setup rvm.
94
+ - source ~/.bash_profile
95
+ # use ruby version 2.3.
96
+ - rvm use 2.3
97
+ # upgrade bundler to latest version.
98
+ - gem install bundler
99
+ # install dependency gems.
100
+ - bundle install --path vendor
101
+ # run tests.
102
+ script:
103
+ - script/test.sh
104
+
105
+ # deploy gems to rubygems.org whenever a tag is released.
106
+ release to rubygems:
107
+ stage: release
108
+ script:
109
+ # setup rvm.
110
+ - source ~/.bash_profile
111
+ # use ruby version 2.6.
112
+ - rvm use 2.6
113
+ # create rubygems credential file for auto login.
114
+ - script/ci_rubygems.sh
115
+ # extract tag from git log and strip "v".
116
+ - version=$(git describe --tags)
117
+ - version=${version:1}
118
+ # build and push gem.
119
+ - gem build html-pipeline-negarmoji.gemspec
120
+ - gem push "html-pipeline-negarmoji-$version.gem"
121
+ # only run for new tags.
122
+ only:
123
+ - tags
124
+ when: manual
data/.rubocop.yml CHANGED
@@ -1,10 +1,51 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
- require: rubocop-jekyll
4
- inherit_gem:
5
- rubocop-jekyll: .rubocop.yml
6
-
7
3
  AllCops:
8
4
  TargetRubyVersion: 2.3
9
5
  Exclude:
10
6
  - vendor/**/*
7
+ - test/**/*
8
+ - db/**/*
9
+ - Rakefile
10
+ - ./*.gemspec
11
+
12
+
13
+ Layout/AlignHash:
14
+ EnforcedHashRocketStyle: table
15
+
16
+ Layout/MultilineMethodCallIndentation:
17
+ EnforcedStyle: indented_relative_to_receiver
18
+ IndentationWidth: 2
19
+
20
+ Metrics/AbcSize:
21
+ Max: 50
22
+
23
+ Metrics/BlockLength:
24
+ Max: 50
25
+
26
+ Metrics/CyclomaticComplexity:
27
+ Max: 10
28
+
29
+ Metrics/LineLength:
30
+ Max: 85
31
+
32
+ Metrics/MethodLength:
33
+ Max: 40
34
+
35
+ Metrics/ModuleLength:
36
+ Max: 200
37
+
38
+ Metrics/PerceivedComplexity:
39
+ Max: 10
40
+
41
+ Naming/FileName:
42
+ Enabled: false
43
+
44
+ Style/HashSyntax:
45
+ EnforcedStyle: hash_rockets
46
+
47
+ Style/RegexpLiteral:
48
+ EnforcedStyle: percent_r
49
+
50
+ Style/StringLiterals:
51
+ EnforcedStyle: double_quotes
data/.rubocop_todo.yml CHANGED
@@ -0,0 +1,7 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2018-12-06 11:59:49 +0100 using RuboCop version 0.61.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
data/CODE_OF_CONDUCT.md CHANGED
@@ -76,4 +76,3 @@ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.ht
76
76
 
77
77
  For answers to common questions about this code of conduct, see
78
78
  https://www.contributor-covenant.org/faq
79
-
data/CONTRIBUTING.md CHANGED
@@ -1,16 +1,200 @@
1
- ## Contribute to Negareh Emoji HTML Pipeline
2
-
3
- ### Quick start
4
-
5
- 1. Open an issue about your feature request or bug report at the first place to discuss it before starting coding
6
- 2. Fork this repo on GitLab
7
- 3. Create a new branch e.g. my-awesome-new-feature
8
- 4. Follow guidelines in commit messages
9
- 5. Edit `CHANGELOG.md` file
10
- 6. Run `script/test` to see if you didn't break anything
11
- 7. Create a pull request on GitLab
12
-
13
- ### Commit message guideline
14
- In order to keep git logs clean and easy to understand for future development, please follow this
15
- guideline:
1
+ # Contributing to Negareh Emoji HTML Pipeline
16
2
 
3
+ Welcome! Azadeh Afzar - Negareh Emoji HTML Pipeline (AA-NEHP) is a project to make it
4
+ easy for jekyll users to generate nice emojis on their website.
5
+ If you're trying AA-NEHP, your experience and what you can contribute are important to
6
+ the project's success.
7
+
8
+
9
+ ## Getting started, building, and testing
10
+
11
+ If you haven't already, take a look at the project's [README.md file](README.md).
12
+
13
+ ### Git repository
14
+
15
+ All project's development and discussion takes place on [GitLab][gitlab repo],
16
+ there is also a mirror on [GitHub][github repo].
17
+
18
+ For contributing to this project, first login into your GitLab account and fork this
19
+ repository. After forking this repo, clone it into your local machine and create a
20
+ new branch from `master` branch with a descriptive name that describes your new feature
21
+ or `fix #issue-code` when you are fixing an issue. This part is important!
22
+ we do not accept MRs from master branch.
23
+
24
+ After doing your changes, commit and push your new branch to your forked repository on
25
+ GitLab and then ask for a Merge Request to `master` branch of this repository.
26
+
27
+ ### Environment and dependency
28
+
29
+
30
+ [gitlab repo]: https://gitlab.com/Azadeh-Afzar/Web-Development/Negareh-HTML-Pipeline
31
+ [github repo]: https://github.com/azadeh-afzar/Negareh-HTML-Pipeline
32
+
33
+ ## Discussion
34
+
35
+ If you've run into behavior in Negareh Emoji HTML Pipeline you don't understand,
36
+ or you're having trouble working out a good way to apply it to your code, or
37
+ you've found a bug or would like a feature it doesn't have, we want to hear from you!
38
+
39
+ Our main forum for discussion is the project's [GitLab issue tracker][gitlab issue].
40
+ This is the right place to start a discussion of any of the above or most any other
41
+ topic concerning the project.
42
+
43
+ ### Code of Conduct
44
+
45
+ Everyone participating in the AA-NEHP community, and in particular
46
+ in our issue tracker, pull requests, and IRC channel, is expected to treat
47
+ other people with respect and more generally to follow the guidelines
48
+ articulated in the [Negareh Emoji HTML Pipeline Code of Conduct](CODE_OF_CONDUCT.md).
49
+
50
+ [gitlab issue]: https://gitlab.com/Azadeh-Afzar/Web-Development/Negareh-HTML-Pipeline/issues
51
+
52
+ ## First Time Contributors
53
+
54
+ Negareh Emoji HTML Pipeline appreciates your contribution! If you are interested in
55
+ helping improve AA-NEHP, there are several ways to get started:
56
+
57
+ * Find bugs and open issues on GitLab! this is almost one of the best ways to contribute.
58
+ * Work on [documentation issues][project documentation].
59
+ * Write tests for existing modules.
60
+ * Add new features (first discuss it as an issue).
61
+
62
+ [project documentation]: https://gitlab.com/Azadeh-Afzar/Web-Development/Negareh-HTML-Pipeline/labels/documentation
63
+
64
+ ## Submitting Changes
65
+
66
+ Even more excellent than a good bug report is a fix for a bug, or the
67
+ implementation of a much-needed new feature. (*) We'd love to have
68
+ your contributions.
69
+
70
+ (*) If your new feature will be a lot of work, we recommend talking to
71
+ us early -- see below.
72
+
73
+ We use the usual [GitLab merge-request flow][gitlab flow],
74
+ which may be familiar to you if you've contributed to other projects on GitLab.
75
+
76
+ Anyone interested in Negareh Emoji HTML Pipeline may review your code.
77
+ One of the AA-NEHP core developers will merge your
78
+ merge request when they think it's ready.
79
+ For every merge request, we aim to promptly either merge it or say why
80
+ it's not yet ready; if you go a few days without a reply, please feel
81
+ free to ping the thread by adding a new comment.
82
+
83
+ For a list of AA-NEHP core developers, see the file [CREDITS](CREDITS).
84
+
85
+ [gitlab flow]: https://docs.gitlab.com/ee/user/project/merge_requests
86
+
87
+ ## Preparing Changes
88
+
89
+ Before you begin: if your change will be a significant amount of work
90
+ to write, we highly recommend starting by opening an issue laying out
91
+ what you want to do. That lets a conversation happen early in case
92
+ other contributors disagree with what you'd like to do or have ideas
93
+ that will help you do it.
94
+
95
+ The best pull requests are focused, clearly describe what they're for
96
+ and why they're correct, and contain tests for whatever changes they
97
+ make to the code's behavior. As a bonus these are easiest for someone
98
+ to review, which helps your merge request get merged quickly! Standard
99
+ advice about good merge requests for open-source projects applies; we
100
+ have [our own writeup][good merge request]
101
+ of this advice.
102
+
103
+ See also our [coding conventions][code conventions] -- which consist mainly of a
104
+ reference to [Ruby Style Guide][ruby style] -- for the code you
105
+ put in the merge request.
106
+
107
+ Also, do not squash your commits after you have submitted a merge request, as this
108
+ erases context during review. We will squash commits when the merge request is merged.
109
+
110
+ You may also find other pages in the [AA-NEHP wiki][wiki]
111
+ helpful in developing your change.
112
+
113
+ [goode merge request]: https://gitlab.com/Azadeh-Afzar/Web-Development/Negareh-HTML-Pipeline/wikis/Good-Merge-Request
114
+ [code conventions]: https://gitlab.com/Azadeh-Afzar/Web-Development/Negareh-HTML-Pipeline/wikis/Code-Conventions
115
+ [wiki]: https://gitlab.com/Azadeh-Afzar/Web-Development/Negareh-HTML-Pipeline/wikis
116
+ [ruby style]: https://www.rubystyle.guide
117
+
118
+ # Core developer guidelines
119
+
120
+ Core developers should follow these rules when processing merge requests:
121
+
122
+ * Always wait for tests to pass before merging MRs.
123
+ * Use "[Squash and merge](https://gitlab.com/blog/2141-squash-your-commits)"
124
+ to merge MRs.
125
+ * Delete branches for merged MRs (by core devs pushing to the main repo).
126
+ * Edit the final commit message before merging to conform to the following
127
+ style (we wish to have a clean `git log` output):
128
+ * all commit messages should start with one of these keywords in the subject:
129
+ - init: for initial commits.
130
+ - add: for adding new feature.
131
+ - fix: for fixing an issue.
132
+ - modify: for changing existing code for optimization/readability etc.
133
+ - update: for changing doc files or comments.
134
+ - remove: for deleting code or file.
135
+ - build: for updating MakeFiles, etc for build process.
136
+ - style: for fixing indentation or line breaks, etc.
137
+ - document: for adding new documentation.
138
+ - version: for releasing version tags.
139
+ - ci: for DevOps jobs, like editing `.travis.yml` file.
140
+ - [skip ci]: use this keyword when you change docs to avoid running CI/CD jobs.
141
+
142
+ * When merging a multi-commit MR make sure that the commit message doesn't
143
+ contain the local history from the committer and the review history from
144
+ the MR. Edit the message to only describe the end state of the MR.
145
+ * Make sure there is a *single* newline at the end of the commit message.
146
+ This way there is a single empty line between commits in `git log`
147
+ output.
148
+ * Split lines as needed so that the maximum line length of the commit
149
+ message is under 80 characters, including the subject line.
150
+ * Do not capitalize the subject and each paragraph.
151
+ * Make sure that the subject of the commit message has no trailing dot.
152
+ * If the MR fixes an issue, make sure something like "issue #xxx." occurs
153
+ in the body of the message and not in the subject (e.g. `fix: issue #32`).
154
+ * Use Markdown for formatting.
155
+
156
+
157
+ ## Issue-tracker conventions
158
+
159
+ We aim to reply to all new issues promptly. We'll assign a milestone
160
+ to help us track which issues we intend to get to when, and may apply
161
+ labels to carry some other information. Here's what our milestones
162
+ and labels mean.
163
+
164
+ ### Task priority and sizing
165
+
166
+ We use GitLab "labels" ([see our list][labels])
167
+ to roughly order what we want to do soon and less soon. There's two dimensions
168
+ taken into account: **priority** (does it matter to our users) and **size** (how
169
+ long will it take to complete).
170
+
171
+ Bugs that aren't a huge deal but do matter to users and don't seem
172
+ like a lot of work to fix generally will be dealt with sooner; things
173
+ that will take longer may go further out.
174
+
175
+ We are trying to keep the backlog at a manageable size, an issue that is
176
+ unlikely to be acted upon in foreseeable future is going to be
177
+ respectfully closed. This doesn't mean the issue is not important, but
178
+ rather reflects the limits of the team.
179
+
180
+ The **question** label is for issue threads where a user is asking a
181
+ question but it isn't yet clear that it represents something to actually
182
+ change. We use the issue tracker as the preferred venue for such
183
+ questions, even when they aren't literally issues, to keep down the
184
+ number of distinct discussion venues anyone needs to track. These might
185
+ evolve into a bug or feature request.
186
+
187
+ Issues **without a priority or size** haven't been triaged. We aim to
188
+ triage all new issues promptly, but there are some issues from previous
189
+ years that we haven't yet re-reviewed since adopting these conventions.
190
+
191
+ ### Other labels
192
+
193
+ * **discussion**: This issue needs agreement on some kind of
194
+ design before it makes sense to implement it, and it either doesn't
195
+ yet have a design or doesn't yet have agreement on one.
196
+ * **feature**, **bug**, **crash**, **refactoring**, **documentation**:
197
+ These classify the user-facing impact of the change. Specifically
198
+ "refactoring" means there should be no user-facing effect.
199
+
200
+ [labels]: https://gitlab.com/Azadeh-Afzar/Web-Development/Negareh-HTML-Pipeline/labels
data/CREDITS ADDED
@@ -0,0 +1,11 @@
1
+ # Credits
2
+
3
+ For full list of contributors you can mine the commit history:
4
+ https://gitlab.com/Azadeh-Afzar/Web-Development/Negareh-Emoji-HTML-Pipeline/commits/master
5
+
6
+ or see graphs:
7
+ https://gitlab.com/Azadeh-Afzar/Web-Development/Negareh-Emoji-HTML-Pipeline/-/graphs/master
8
+
9
+ Core team:
10
+
11
+ Mohammad Mahdi Baghbani Pourvahid <MahdiBaghbani@protonmail.com>
data/Gemfile CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gemspec
5
+ gemspec
data/LICENSE CHANGED
@@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you
671
671
  may consider it more useful to permit linking proprietary applications with
672
672
  the library. If this is what you want to do, use the GNU Lesser General
673
673
  Public License instead of this License. But first, please read
674
- <https://www.gnu.org/licenses/why-not-lgpl.html>.
674
+ <https://www.gnu.org/licenses/why-not-lgpl.html>.
data/README.md CHANGED
@@ -1 +1,92 @@
1
- ## Negareh
1
+ <p align="center">
2
+ <br>
3
+ <a href="#">
4
+ <img src="logo.svg" width="100" alt="Negareh Emoji HTML Pipeline"/>
5
+ </a>
6
+ </p>
7
+
8
+ <h1 align="center">Negareh Emoji HTML Pipeline</h1>
9
+ <h3 align="center">HTML emoji filter pipeline to convert emoji aliases to actual emoji images.</h3>
10
+
11
+ <p align="center">
12
+ <a title="Open Source" href="https://opensource.com/resources/what-open-source" target="_blank">
13
+ <img src="https://img.shields.io/badge/Open%20Source-Forever-brightgreen?logo=open-source-initiative&style=flat-square" alt="Open Source">
14
+ </a>
15
+ <a title="License: GPLv3" href="https://www.opensource.org/licenses/GPL-3.0" target="_blank">
16
+ <img src="https://img.shields.io/github/license/azadeh-afzar/Negareh-Emoji-HTML-Pipeline?logo=gnu&style=flat-square" alt="License: GPLv3">
17
+ </a>
18
+ <a title="Language counter" href="#" target="_blank">
19
+ <img src="https://img.shields.io/github/languages/count/azadeh-afzar/Negareh-Emoji-HTML-Pipeline?logo=gitlab&style=flat-square" alt="Language counter">
20
+ </a>
21
+ <a title="Top language" href="#" target="_blank">
22
+ <img src="https://img.shields.io/github/languages/top/azadeh-afzar/Negareh-Emoji-HTML-Pipeline?logo=gitlab&style=flat-square" alt="Top language">
23
+ </a>
24
+
25
+ <br>
26
+
27
+ <a title="Code Quality: Codefactor.io" href="https://www.codefactor.io/repository/github/azadeh-afzar/Negareh-Emoji-HTML-Pipeline" target="_blank">
28
+ <img src="https://www.codefactor.io/repository/github/azadeh-afzar/Negareh-Emoji-HTML-Pipeline/badge?style=flat-square" alt="CodeFactor"/>
29
+ </a>
30
+ <a title="Code Quality: CodeClimate.com" href="https://codeclimate.com/github/azadeh-afzar/Negareh-Emoji-HTML-Pipeline/maintainability" target="_blank">
31
+ <img src="https://img.shields.io/codeclimate/maintainability/azadeh-afzar/Negareh-Emoji-HTML-Pipeline?logo=code-climate&style=flat-square" alt="CodeClimate rating"/>
32
+ </a>
33
+ <a title="Code Technical Debt: CodeClimate.com" href="https://codeclimate.com/github/azadeh-afzar/Negareh-Emoji-HTML-Pipeline/maintainability" target="_blank">
34
+ <img src="https://img.shields.io/codeclimate/tech-debt/azadeh-afzar/Negareh-Emoji-HTML-Pipeline?logo=code-climate&style=flat-square" alt="CodeClimate technical debt"/>
35
+ </a>
36
+ <a title="Code Issues: CodeClimate.com" href="https://codeclimate.com/github/azadeh-afzar/Negareh-Emoji-HTML-Pipeline/maintainability" target="_blank">
37
+ <img src="https://img.shields.io/codeclimate/issues/azadeh-afzar/Negareh-Emoji-HTML-Pipeline?logo=code-climate&style=flat-square" alt="CodeClimate issues"/>
38
+ </a>
39
+
40
+ <br>
41
+
42
+ <a title="GitLab: pipeline status" href="https://gitlab.com/Azadeh-Afzar/Web-Development/Negareh-Emoji-HTML-Pipeline/commits/master" target="_blank">
43
+ <img src="https://img.shields.io/gitlab/pipeline/Web-Development/Negareh-Emoji-HTML-Pipeline?gitlab_url=https%3A%2F%2Fgitlab.com%2FAzadeh-Afzar&logo=gitlab&style=flat-square" alt="pipeline status" />
44
+ </a>
45
+ <a title="Test Coverage: CodeClimate.com" href="https://codeclimate.com/github/azadeh-afzar/Negareh-Emoji-HTML-Pipeline" target="_blank">
46
+ <img src="https://img.shields.io/codeclimate/coverage/azadeh-afzar/Negareh-Emoji-HTML-Pipeline?logo=code-climate&style=flat-square" alt="CodeClimate"/>
47
+ </a>
48
+
49
+ <br>
50
+
51
+ <a title="Gem Version" href="https://rubygems.org/gems/html-pipeline-negarmoji">
52
+ <img src="https://img.shields.io/gem/v/html-pipeline-negarmoji?color=red&label=Negareh%20Emoji%20HTML%20Pipeline&logo=rubygems&style=flat-square" alt="Gem Version">
53
+ </a>
54
+ </p>
55
+
56
+ > If you are viewing this repository on GitHub, this GitHub repository is a mirror of the Negareh Emoji HTML Pipeline,
57
+ > the main repository is served on
58
+ ><a href="https://gitlab.com/Azadeh-Afzar/Web-Development/Negareh-Emoji-HTML-Pipeline">GitLab</a>, all developments and
59
+ >discussions, issue tracking and merge requests take place in GitLab.
60
+
61
+
62
+ ## Negareh Emoji Library
63
+
64
+
65
+ Negareh emoji library is an emoji filter plugin for html pipeline, this package is
66
+ more flexible and customizable then the default emoji filter in html/pipeline.
67
+
68
+
69
+ ### Installation
70
+
71
+ Add `html-pipeline-negarmoji` to your Gemfile.
72
+
73
+ ``` ruby
74
+ gem 'negarmoji'
75
+ ```
76
+
77
+ ## Contribution
78
+
79
+ If you want to contribute to this project, please read [CONTRIBUTING](CONTRIBUTING.md).
80
+
81
+ ## Code of Conduct
82
+
83
+ Visit the [Code of Conduct](CODE_OF_CONDUCT.md).
84
+
85
+ ## Roadmap
86
+
87
+ Visit the [Roadmap](ROADMAP.md) to keep track of which features we are currently
88
+ working on.
89
+
90
+ ## License
91
+
92
+ Licensed under the [GPLv3](LICENSE).
data/ROADMAP.md CHANGED
@@ -0,0 +1,27 @@
1
+ # Negareh Emoji HTML Pipeline v1.0 Roadmap
2
+
3
+ ## Overview
4
+
5
+ This document outlines our roadmap to delivering Azadeh Afzar - Negareh Emoji HTML Pipeline
6
+ v1.0 by Summer 2021.
7
+
8
+ ## Milestones
9
+
10
+ The Azadeh Afzar - Negareh Emoji HTML Pipeline
11
+ v1.0 project milestones:
12
+
13
+ Milestone name: No milestones.
14
+ Start date of this Milestone: None
15
+
16
+ | Feature | Duration |
17
+ | --- | --- |
18
+
19
+
20
+ ## Terminal Roadmap / Timeline
21
+
22
+ Ultimately, we're aiming for Negareh Emoji HTML Pipeline v1.0 to be feature-complete by Jan 2021,
23
+ and to declare v1.0 by Jul 2021:
24
+
25
+ | Milestone end date | Milestone Name | Key Deliverables |
26
+ | --- | --- | --- |
27
+ | 2019-09-16 | Start | Azadeh Afzar starts working on this plugin
data/SUPPORT.md CHANGED
@@ -1 +1,6 @@
1
- ## Negareh Emoji HTML Pipeline Support
1
+ ## Support Azadeh Afzar
2
+
3
+ If you liked this work and you want to help Azadeh Afzar, you can become a patron
4
+ at https://www.patreon.com/AzadehAfzar
5
+
6
+ Thank You!
@@ -11,9 +11,9 @@ Gem::Specification.new do |spec|
11
11
  spec.authors = ["Mohammad Mahdi Baghbani Pourvahid"]
12
12
  spec.email = "MahdiBaghbani@protonmail.com"
13
13
  spec.homepage = "https://gitlab.com/Azadeh-Afzar/Web-Development/Negareh-Emoji-HTML-Pipeline"
14
- spec.description = "%(Negareh emoji library emoji filter for html pipeline, this package is more
15
- flexible and customizable then the original emoji filter present in
16
- html/pipeline)"
14
+ spec.description = "Negareh emoji library is an emoji filter plugin for html pipeline,
15
+ this package is more flexible and customizable then the default
16
+ emoji filter in html/pipeline."
17
17
  spec.summary = "Negareh emoji html pipeline"
18
18
  spec.licenses = "GPL-3.0"
19
19
 
@@ -24,12 +24,12 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  spec.required_ruby_version = ">= 2.3.0"
26
26
 
27
- spec.add_dependency "html-pipeline", "~> 2.2"
28
- spec.add_dependency "negarmoji", "~> 0.1.1"
27
+ spec.add_dependency "html-pipeline", "~> 2.12"
28
+ spec.add_dependency "negarmoji", "~> 0.1.3"
29
29
 
30
30
  spec.add_development_dependency "bundler", "~> 2.0"
31
- spec.add_development_dependency "rake", "~> 12.0"
31
+ spec.add_development_dependency "rake", "~> 13.0"
32
32
  spec.add_development_dependency "rspec", "~> 3.0"
33
- spec.add_development_dependency "rubocop-jekyll", "~> 0.4"
33
+ spec.add_development_dependency "rubocop-jekyll", "~> 0.10"
34
34
  spec.add_development_dependency "simplecov", "~> 0.17.0"
35
- end
35
+ end
@@ -11,21 +11,23 @@ module HTML
11
11
  # Context:
12
12
  # :asset_root (required) - base url to link to emoji sprite.
13
13
  #
14
- # :asset_path (optional) - url path to link to emoji sprite. :file_name can be used as
15
- # a placeholder for the sprite file name.
14
+ # :asset_path (optional) - url path to link to emoji sprite. :file_name can
15
+ # be used as a placeholder for the sprite file name.
16
16
  # If no asset_path is set ":file_name" is used.
17
17
  #
18
- # :extension (optional) - extension to be use for emoji files, default extension is svg.
18
+ # :extension (optional) - extension to be use for emoji files, default
19
+ # extension is svg.
19
20
  #
20
- # :ignored_ancestor_tags (optional) - Tags to stop the emojification. Node has matched
21
- # ancestor HTML tags will not be emojified. Default to pre, code, and tt tags. Extra tags
22
- # please pass in the form of array, e.g., %w(blockquote summary).
21
+ # :ignored_ancestor_tags (optional) - Tags to stop the emojification. Node
22
+ # has matched ancestor HTML tags will not be emojified. Default to pre, code,
23
+ # and tt tags. Extra tags please pass in the form of array,
24
+ # e.g., %w(blockquote summary).
23
25
  #
24
26
  # :img_attrs (optional) - Attributes for generated img tag.
25
- # E.g. Pass { "draggble" => true, "height" => nil } to set draggable attribute to "true"
26
- # and clear height attribute of generated img tag.
27
+ # E.g. Pass { "draggble" => true, "height" => nil } to set draggable
28
+ # attribute to "true" and clear height attribute of generated img tag.
27
29
  class NegarehEmojiFilter < Filter
28
- DEFAULT_IGNORED_ANCESTOR_TAGS = %w(pre code tt).freeze
30
+ DEFAULT_IGNORED_ANCESTOR_TAGS = %w[pre code tt].freeze
29
31
 
30
32
  def call
31
33
  doc.search(".//text()").each do |node|
@@ -70,9 +72,11 @@ module HTML
70
72
 
71
73
  # The url path to link emoji sprites
72
74
  #
73
- # :file_name can be used in the asset_path as a placeholder for the sprite file name.
75
+ # :file_name can be used in the asset_path as a placeholder for the sprite
76
+ # file name.
74
77
  # If no asset_path is set in the context ":file_name" is used.
75
- # Returns the context's asset_path or the default path if no context asset_path is given.
78
+ # Returns the context's asset_path or the default path if no context
79
+ # asset_path is given.
76
80
  def asset_path(name)
77
81
  if context[:asset_path]
78
82
  context[:asset_path].gsub(":file_name", emoji_filename(name))
@@ -90,7 +94,9 @@ module HTML
90
94
 
91
95
  # Build a regexp that matches all valid :emoji: names.
92
96
  def self.emoji_pattern
93
- @emoji_pattern ||= %r!:(#{emoji_names.map { |name| Regexp.escape(name) }.join("|")}):!
97
+ @emoji_pattern ||= %r{
98
+ :(#{emoji_names.map { |name| Regexp.escape(name) }.join("|")}):
99
+ }x
94
100
  end
95
101
 
96
102
  def self.emoji_names
@@ -103,11 +109,12 @@ module HTML
103
109
  def emoji_image_tag(name)
104
110
  require "active_support/core_ext/hash/indifferent_access"
105
111
  html_attrs = default_img_attrs(name)
106
- .merge!((context[:img_attrs] || {}))
107
- .map do |attr, value|
108
- !value.nil? && %(#{attr}="#{value.respond_to?(:call) && value.call(name) || value}")
112
+ .merge!((context[:img_attrs] || {}))
113
+ .map do |attr, value|
114
+ call_respond = value.respond_to?(:call)
115
+ !value.nil? && %(#{attr}="#{call_respond && value.call(name) || value}")
109
116
  end
110
- .reject(&:blank?).join(" ")
117
+ .reject(&:blank?).join(" ")
111
118
 
112
119
  "<img #{html_attrs}>"
113
120
  end
@@ -121,7 +128,7 @@ module HTML
121
128
  :src => emoji_url(name).to_s,
122
129
  :height => "20",
123
130
  :width => "20",
124
- :align => "absmiddle",
131
+ :align => "absmiddle"
125
132
  }
126
133
  end
127
134
 
@@ -3,7 +3,7 @@
3
3
  module Html
4
4
  module Pipeline
5
5
  module NegarMojiHtmlPipeline
6
- VERSION = "0.0.4"
6
+ VERSION = "0.1.0"
7
7
  end
8
8
  end
9
9
  end
@@ -4,8 +4,8 @@ require "html/pipeline"
4
4
  require "html/pipeline/negarmoji-pipeline/version"
5
5
 
6
6
  module HTML
7
- class Pipeline
8
- class NegarMojiHtmlPipeline
7
+ class Pipeline # :nodoc:
8
+ class NegarMojiHtmlPipeline # :nodoc:
9
9
  # Negareh Emoji HTML Pipeline related filters for html-pipeline.
10
10
  # Implements new filters used by Negareh Emoji HTML Pipeline
11
11
 
data/logo.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="377.953" height="100mm" viewBox="0 0 100 100"><path d="M30.686 58.482h-4.66v8.154h4.66M26.027 62.56h3.494" fill="none" stroke="#000" stroke-width="2.32964" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/><path d="M52.03 66.636l-3.49-8.142-3.49 8.142M46.214 64.686h4.652" fill="none" stroke="#000" stroke-width="2.32634" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/><path d="M78.246 58.508v8.128M82.89 58.508v8.128" fill="none" stroke="#000" stroke-width="2.32234" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/><path d="M82.89 62.557h-4.644" fill="none" stroke="#000" stroke-width="2.3237989999999997" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/><g><path d="M14.936 66.636v-8.129l5.806 8.129v-8.129" fill="none" stroke="#000" stroke-width="2.32246" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/></g><g><path d="M39.326 59.231a2.912 2.912 0 0 0-4.845 2.18v2.33a2.913 2.913 0 0 0 5.825 0v-1.182h-2.33" fill="none" stroke="#000" stroke-width="2.32968" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/></g><g><path d="M57.733 66.636v-8.141h3.104a2.029 2.029 0 0 1 0 4.055h-3.104M60.852 62.55l1.764 4.086" fill="none" stroke="#000" stroke-width="2.326" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/></g><g><path d="M72.961 58.482h-4.66v8.154h4.66M68.302 62.56h3.494" fill="none" stroke="#000" stroke-width="2.32964" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/></g><g><g transform="matrix(.43766 0 0 .43766 25.442 24.562)"><circle r="23" cy="36.051" cx="35.034" fill="#fcea2b"/><path d="M25.533 27.49c-1.265-3.355-6.44-3.57-6.117 1.317.044.649.281 1.272.642 1.814l5.318 6.422 5.22-6.266c.58-.696.923-1.578.906-2.485-.086-4.353-5.051-4.035-6.127-.804M44.835 27.49c-1.255-3.355-6.387-3.57-6.066 1.317.043.649.28 1.272.636 1.814l5.274 6.422 5.178-6.266c.575-.696.915-1.578.897-2.485-.085-4.353-5.009-4.035-6.076-.804" fill="#d22f27"/><path fill="#fff" d="M39.103 52.777l5.473-2.657 2.116-2.848.699-3.85-6.82.759-18.013-.758 2.347 6.697 5.718 2.657z"/></g><g stroke-miterlimit="10" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" transform="matrix(.43766 0 0 .43766 25.442 24.562)"><circle r="23" cy="36.051" cx="35.034"/><path d="M22.558 42.724s12.757 3.098 24.893.067M47.62 42.724c0 5.63-4.178 10.105-12.554 10.105-8.374 0-12.607-4.489-12.607-10.105M25.533 27.49c-1.265-3.355-6.44-3.57-6.117 1.317.044.649.281 1.272.642 1.814l5.318 6.422v0l5.22-6.266c.58-.696.923-1.578.906-2.485-.086-4.353-5.051-4.035-6.127-.804M44.835 27.49c-1.255-3.355-6.387-3.57-6.066 1.317.043.649.28 1.272.636 1.814l5.274 6.422v0l5.178-6.266c.575-.696.915-1.578.897-2.485-.085-4.353-5.009-4.035-6.076-.804"/></g><path d="M67.953 15.761v5.305c0 .61-.49 1.09-1.09 1.09H48.474c-3.094 0-3.824 2.68-3.987 4.172a1.085 1.085 0 0 1-1.078.959h-5.47c-.598 0-1.078-.469-1.089-1.068-.012-3.05.894-11.547 11.58-11.547h5.633V9.824h-5.175V6.327h14.435v3.497h-5.175v4.848h8.715c.6 0 1.09.49 1.09 1.089z" stroke-miterlimit="10" fill="none" stroke="#000" stroke-width="2.1783696" stroke-linecap="round" stroke-linejoin="round"/></g><g><path d="M23.395 80.716v-8.141l-3.49 6.978-3.488-6.978v8.141" fill="none" stroke="#000" stroke-width="2.3261" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/><path d="M31.85 80.716h0a2.912 2.912 0 0 1-2.912-2.912v-2.33a2.912 2.912 0 0 1 5.824 0v2.33a2.912 2.912 0 0 1-2.912 2.912z" fill="none" stroke="#000" stroke-width="2.32968" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/><path d="M44.154 72.169v5.233a2.907 2.907 0 0 1-4.853 2.161" fill="none" stroke="#000" stroke-width="2.326" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/><path d="M11.132 72.562H6.473v8.154h4.66M6.473 76.64h3.495" fill="none" stroke="#000" stroke-width="2.32964" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/><path d="M49.817 72.119v8.597" fill="none" stroke="#000" stroke-width="1.8600921" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/></g><g><path d="M90.623 72.575v8.141h3.49" fill="none" stroke="#000" stroke-width="2.32608" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/><path d="M86.405 80.716v-8.142l-3.489 6.979-3.49-6.979v8.142" fill="none" stroke="#000" stroke-width="2.32618" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/><path d="M71.305 72.587h4.645M73.628 72.587v8.129" fill="none" stroke="#000" stroke-width="2.32244" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/><g><path d="M62.656 72.588v8.128M67.301 72.588v8.128" fill="none" stroke="#000" stroke-width="2.32234" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/><path d="M67.301 76.637h-4.645" fill="none" stroke="#000" stroke-width="2.3237989999999997" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/></g></g><g><path d="M20.65 94.058v-8.141h3.104a2.029 2.029 0 0 1 0 4.055H20.65" fill="none" stroke="#000" stroke-width="2.3261" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/><path d="M29.612 85.46v8.598" fill="none" stroke="#000" stroke-width="1.8600921" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/><path d="M34.357 94.058v-8.141h3.104a2.029 2.029 0 0 1 0 4.055h-3.104" fill="none" stroke="#000" stroke-width="2.3261" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/><path d="M47.98 85.904h-4.66v8.154h4.66M43.32 89.981h3.494" fill="none" stroke="#000" stroke-width="2.32964" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/><path d="M51.67 85.917v8.14h3.489" fill="none" stroke="#000" stroke-width="2.32608" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/><path d="M59.376 85.46v8.598" fill="none" stroke="#000" stroke-width="1.8600921" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/><path d="M63.587 94.058v-8.129l5.806 8.129v-8.129" fill="none" stroke="#000" stroke-width="2.32246" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/><g><path d="M77.743 85.904h-4.66v8.154h4.66M73.084 89.981h3.494" fill="none" stroke="#000" stroke-width="2.32964" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/></g></g></svg>
@@ -0,0 +1,13 @@
1
+ #!/bin/bash
2
+ # Usage: script/ci_rubygems.sh
3
+ #
4
+ # Create credential file for rubygems.org.
5
+
6
+ # set flag for shell execution.
7
+ # -e Exit immediately if a command exits with a non-zero status.
8
+ set -e
9
+
10
+ mkdir -p ~/.gem
11
+ touch ~/.gem/credentials
12
+ chmod 0600 ~/.gem/credentials
13
+ printf -- "---\r\n:rubygems_api_key: %s\n" "${RUBYGEMS_API_KEY}" > ~/.gem/credentials
@@ -0,0 +1,95 @@
1
+ #!/usr/bin/env python3
2
+
3
+ # Python Standard Library
4
+ import os
5
+ import subprocess
6
+
7
+ # get path to this file's directory, then go one directory up.
8
+ file_path = os.path.abspath(os.path.dirname(__file__))
9
+ base_path = os.path.abspath(os.path.dirname(file_path))
10
+ version_file_path = os.path.join(base_path, "lib", "html", "pipeline", "negarmoji-pipeline", "version.rb")
11
+
12
+ # open version file.
13
+ with open(version_file_path) as file:
14
+ version_file = file.readlines()
15
+
16
+ # set version and version_info to None, so if we didn't find
17
+ # a version in version.rb, we can throw an error.
18
+ version = None
19
+ version_info = None
20
+
21
+ # find version.
22
+ for line in version_file:
23
+ if "VERSION = " in line:
24
+ # find version string and covert it to
25
+ # standard x.y.z version format.
26
+ double_quote_left = line.index("\"") + 1
27
+ double_quote_right = line[double_quote_left:].index("\"") + double_quote_left
28
+ version = line[double_quote_left:double_quote_right]
29
+ # creat a list from x.y.z string which has [x, y, z]
30
+ # notice that x, y , z must be converted to integer
31
+ version_info = [int(number) for number in version.split(".")]
32
+
33
+ # throw error if version not found.
34
+ if not version or not version_info:
35
+ raise ValueError("ERROR: version not found at version.rb.")
36
+
37
+ print("This program will tag a new release of Negareh Emoji HTML Pipeline\n"
38
+ + "and it will push to gitlab and github for building,\n"
39
+ + "gitlab will push a built gem to rubygems.org.\n\n"
40
+ + f"current version is {version}\n\n")
41
+
42
+ # read and convert to integer.
43
+ print("Version is in X.Y.Z form.\n"
44
+ "X is version major, Y is version minor, Z is version minor.\n\n")
45
+ new_major = int(input("Enter version major number:\n"))
46
+ new_minor = int(input("Enter version minor number:\n"))
47
+ new_patch = int(input("Enter version patch number:\n"))
48
+
49
+ new_version = ".".join(map(str, [new_major, new_minor, new_patch]))
50
+
51
+ # check version to be bigger than last version.
52
+ if new_version == version:
53
+ raise ValueError("Version can't be same as current version!")
54
+
55
+ if new_major < version_info[0]:
56
+ raise ValueError("Major version can't be less than current version!")
57
+ elif new_major > version_info[0]:
58
+ pass
59
+ elif new_minor < version_info[1]:
60
+ raise ValueError("Minor version can't be less than current version!")
61
+ elif new_minor > version_info[1]:
62
+ pass
63
+ elif new_patch < version_info[2]:
64
+ raise ValueError("Patch version can't be less than current version!")
65
+
66
+
67
+ # creat an empty list for new version.rb file
68
+ print("Writing new version. \n\n")
69
+
70
+ new_version_rb = list()
71
+
72
+ # write new VERSION in version.rb.
73
+ new_version_info = f" VERSION = \"{new_major}.{new_minor}.{new_patch}\"\n"
74
+
75
+ # replace old version with new one.
76
+ with open(version_file_path, "r") as file:
77
+ lines = file.readlines()
78
+ for line in lines:
79
+ if "VERSION = " in line:
80
+ new_version_rb.append(new_version_info)
81
+ else:
82
+ new_version_rb.append(line)
83
+
84
+ # write updated content from new_version_rb
85
+ # back into version.rb. file
86
+ with open(version_file_path, "w+") as file:
87
+ file.writelines(new_version_rb)
88
+
89
+ # do git commit and tag and push to upstreams
90
+ print("Commit and Tag and Push to upstream. \n\n")
91
+
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)
94
+ subprocess.call(f"git push origin HEAD \"v{new_version}\"", shell=True)
95
+ subprocess.call(f"git push github HEAD \"v{new_version}\"", shell=True)
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env python3
2
+
3
+ # Python Standard Library
4
+ import os
5
+ import subprocess
6
+
7
+ # get path to this file's directory, then go one directory up.
8
+ file_path = os.path.abspath(os.path.dirname(__file__))
9
+ base_path = os.path.abspath(os.path.dirname(file_path))
10
+ version_file_path = os.path.join(base_path, "lib", "html", "pipeline", "negarmoji-pipeline", "version.rb")
11
+
12
+ # open version file.
13
+ with open(version_file_path) as file:
14
+ version_file = file.readlines()
15
+
16
+ # set version and version_info to None, so if we didn't find
17
+ # a version in version.rb, we can throw an error.
18
+ version = None
19
+
20
+ # find version
21
+ for line in version_file:
22
+ if "VERSION = " in line:
23
+ # find version string and covert it to
24
+ # standard x.y.z version format.
25
+ double_quote_left = line.index("\"") + 1
26
+ double_quote_right = line[double_quote_left:].index("\"") + double_quote_left
27
+ version = line[double_quote_left:double_quote_right]
28
+
29
+ # throe error if version not found
30
+ if not version:
31
+ raise ValueError("ERROR: version not found at version.rb.")
32
+
33
+ # remove tag in local and remote repository
34
+ subprocess.call(f"git tag -d \"v{version}\"", shell=True)
35
+ subprocess.call(f"git push --delete origin \"v{version}\"", shell=True)
36
+ subprocess.call(f"git push --delete github \"v{version}\"", shell=True)
37
+
38
+ # revert last commit
39
+ subprocess.call(f"git revert HEAD", shell=True)
data/script/test.sh ADDED
@@ -0,0 +1,12 @@
1
+ #!/bin/bash
2
+ # Usage: script/ci_test.sh
3
+ #
4
+ # Runs tests.
5
+
6
+ # set flag for shell execution.
7
+ # -e Exit immediately if a command exits with a non-zero status.
8
+ # -x Print commands and their arguments as they are executed.
9
+ set -ex
10
+
11
+ script/test_style.sh
12
+ # script/test_module.sh # TODO write tests
@@ -0,0 +1,11 @@
1
+ #!/bin/bash
2
+ # Usage: script/test_modules.sh
3
+ #
4
+ # Runs tests.
5
+
6
+ # set flag for shell execution.
7
+ # -e Exit immediately if a command exits with a non-zero status.
8
+ # -x Print commands and their arguments as they are executed.
9
+ set -ex
10
+
11
+ bundle exec rspec "$@"
@@ -0,0 +1,18 @@
1
+ #!/bin/bash
2
+ # Usage: script/test_style.sh
3
+ #
4
+ # Check code style wit rubocop.
5
+
6
+ # set flag for shell execution.
7
+ # -e Exit immediately if a command exits with a non-zero status.
8
+ set -e
9
+
10
+ echo "Rubocop $(bundle exec rubocop --version)"
11
+ bundle exec rubocop -S -D -E "$@"
12
+
13
+ success=$?
14
+ if ((success != 0)); then
15
+ echo -e "\nTry running \`script/fmt -a\` to automatically fix errors"
16
+ fi
17
+
18
+ exit $success
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.0.4
4
+ version: 0.1.0
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-11-01 00:00:00.000000000 Z
11
+ date: 2019-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: html-pipeline
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.2'
19
+ version: '2.12'
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.2'
26
+ version: '2.12'
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.1
33
+ version: 0.1.3
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.1
40
+ version: 0.1.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '12.0'
61
+ version: '13.0'
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: '12.0'
68
+ version: '13.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0.4'
89
+ version: '0.10'
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.4'
96
+ version: '0.10'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: simplecov
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -109,20 +109,23 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: 0.17.0
111
111
  description: |-
112
- %(Negareh emoji library emoji filter for html pipeline, this package is more
113
- flexible and customizable then the original emoji filter present in
114
- html/pipeline)
112
+ Negareh emoji library is an emoji filter plugin for html pipeline,
113
+ this package is more flexible and customizable then the default
114
+ emoji filter in html/pipeline.
115
115
  email: MahdiBaghbani@protonmail.com
116
116
  executables: []
117
117
  extensions: []
118
118
  extra_rdoc_files: []
119
119
  files:
120
+ - ".codeclimate.yml"
120
121
  - ".gitignore"
122
+ - ".gitlab-ci.yml"
121
123
  - ".rubocop.yml"
122
124
  - ".rubocop_todo.yml"
123
125
  - CHANGELOG.md
124
126
  - CODE_OF_CONDUCT.md
125
127
  - CONTRIBUTING.md
128
+ - CREDITS
126
129
  - Gemfile
127
130
  - LICENSE
128
131
  - README.md
@@ -132,6 +135,13 @@ files:
132
135
  - lib/html/pipeline/negarmoji-pipeline.rb
133
136
  - lib/html/pipeline/negarmoji-pipeline/filter.rb
134
137
  - lib/html/pipeline/negarmoji-pipeline/version.rb
138
+ - logo.svg
139
+ - script/ci_rubygems.sh
140
+ - script/dev_release.py
141
+ - script/dev_revert_tag.py
142
+ - script/test.sh
143
+ - script/test_module.sh
144
+ - script/test_style.sh
135
145
  homepage: https://gitlab.com/Azadeh-Afzar/Web-Development/Negareh-Emoji-HTML-Pipeline
136
146
  licenses:
137
147
  - GPL-3.0
@@ -151,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
161
  - !ruby/object:Gem::Version
152
162
  version: '0'
153
163
  requirements: []
154
- rubygems_version: 3.0.4
164
+ rubygems_version: 3.0.3
155
165
  signing_key:
156
166
  specification_version: 4
157
167
  summary: Negareh emoji html pipeline