aozora2html 0.9.0 → 0.9.1

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
- SHA1:
3
- metadata.gz: ecb4e24d58fac283904c18a996d7f19d308f4d69
4
- data.tar.gz: 0e3738df57189ff06736a508a6aae1c79a34667e
2
+ SHA256:
3
+ metadata.gz: '0118a31e8b655b7a280b0c2e110c30547c391d3bb1d02a7d7ca354d1b12c2888'
4
+ data.tar.gz: 6cc350ae9b8ee45b12e49f3b82d769814c1434b36500a827cf49690fdb242e6e
5
5
  SHA512:
6
- metadata.gz: 84e3a6e4e4dc1d274238a122001995226e0712657a6111080d410dbc1ba1d33e80f1df646b4936bf9553e701e85e0fa9d50ab37ec0afab51dda1fbcdaf04af65
7
- data.tar.gz: fb2f60e2bd5a4f6ee9d0e9c4597915431b4d69c58420a0bd894efee97f49061f317e240a8dd151c1e90591fd82de55b14cc5e4bb37221c2c7fed57f82d85ca6a
6
+ metadata.gz: b4061b71525025ec18e70d9df678e68d69f40790c30390f952d8b1e0c2b236df52136bbe003d718405da1d617b2b915a3c29c5af25ee82e4d1a25548c3eae3de
7
+ data.tar.gz: c533d39bedd615022ee04dd58bcdd36849423f7735938e60bafead04cf8a1302549885785b6eadac802981e0046517e7ea3473e34dd5f757989ff7a25bd1957f
@@ -0,0 +1,25 @@
1
+ name: Test
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+
8
+ runs-on: ${{ matrix.os }}
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ ruby: [ '2.6.x', '2.5.x', '2.4.x' ]
13
+ os: [ubuntu-latest, macOS-latest, windows-latest]
14
+ steps:
15
+ - uses: actions/checkout@v1
16
+ - name: Set up Ruby
17
+ uses: actions/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby }}
20
+ - name: Build and test with Rake
21
+ shell: bash
22
+ run: |
23
+ gem install bundler --no-document
24
+ bundle install --jobs 4 --retry 3
25
+ bundle exec rake
@@ -0,0 +1,227 @@
1
+ inherit_gem:
2
+ meowcop:
3
+ - config/rubocop.yml
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 2.1
7
+
8
+ # EnforcedStyle: with_first_parameter => 0 offense
9
+ # EnforcedStyle: with_fixed_indentation => 17 offenses
10
+ Layout/AlignParameters:
11
+ EnforcedStyle: with_first_parameter
12
+ Enabled: true
13
+
14
+ # EnforcedStyle: empty_lines => 80 offenses
15
+ # EnforcedStyle: no_empty_lines => 0 offense
16
+ Layout/EmptyLinesAroundBlockBody:
17
+ EnforcedStyle: no_empty_lines
18
+ Enabled: true
19
+
20
+ # EnforcedStyleInsidePipes: space => 39 offenses
21
+ # EnforcedStyleInsidePipes: no_space => 0 offense
22
+ Layout/SpaceAroundBlockParameters:
23
+ EnforcedStyleInsidePipes: no_space
24
+ Enabled: true
25
+
26
+ # EnforcedStyle: space => 42 offenses
27
+ # EnforcedStyle: no_space => 4 offenses
28
+ Layout/SpaceBeforeBlockBraces:
29
+ EnforcedStyle: no_space
30
+ Enabled: true
31
+
32
+ # EnforcedStyle: space => 98 offenses
33
+ # EnforcedStyle: no_space => 0 offense
34
+ Layout/SpaceInsideStringInterpolation:
35
+ EnforcedStyle: no_space
36
+ Enabled: true
37
+
38
+ # EnforcedStyle: percent_q => 0 offense
39
+ # EnforcedStyle: bare_percent => 30 offenses
40
+ Style/BarePercentLiterals:
41
+ EnforcedStyle: percent_q
42
+ Enabled: true
43
+
44
+ # EnforcedStyle: nested => 2 offenses
45
+ # EnforcedStyle: compact => 81 offenses
46
+ Style/ClassAndModuleChildren:
47
+ EnforcedStyle: nested
48
+ Enabled: true
49
+
50
+ # EnforcedStyle: compact => 24 offenses
51
+ # EnforcedStyle: expanded => 0 offense
52
+ Style/EmptyMethod:
53
+ EnforcedStyle: expanded
54
+ Enabled: true
55
+
56
+ # EnforcedStyle: when_needed => 10 offenses
57
+ # EnforcedStyle: always => 57 offenses
58
+ # EnforcedStyle: never => 32 offenses
59
+ Style/Encoding:
60
+ EnforcedStyle: when_needed
61
+ Enabled: true
62
+
63
+ # EnforcedStyle: for => 13 offenses
64
+ # EnforcedStyle: each => 0 offense
65
+ Style/For:
66
+ EnforcedStyle: each
67
+ Enabled: true
68
+
69
+ # EnforcedStyle: require_parentheses => 0 offense
70
+ # EnforcedStyle: require_no_parentheses => 112 offenses
71
+ # EnforcedStyle: require_no_parentheses_except_multiline => 112 offenses
72
+ Style/MethodDefParentheses:
73
+ EnforcedStyle: require_parentheses
74
+ Enabled: true
75
+
76
+ # EnforcedStyle: snake_case => 0 offense
77
+ # EnforcedStyle: camelCase => 268 offenses
78
+ Style/MethodName:
79
+ EnforcedStyle: snake_case
80
+ Enabled: true
81
+
82
+ # EnforcedStyle: compact => 25 offenses
83
+ # EnforcedStyle: exploded => 0 offense
84
+ Style/RaiseArgs:
85
+ EnforcedStyle: exploded
86
+ Enabled: true
87
+
88
+ # EnforcedStyle: only_raise => 0 offense
89
+ # EnforcedStyle: only_fail => 26 offenses
90
+ # EnforcedStyle: semantic => 25 offenses
91
+ Style/SignalException:
92
+ EnforcedStyle: only_raise
93
+ Enabled: true
94
+
95
+ # EnforcedStyle: snake_case => 0 offense
96
+ # EnforcedStyle: camelCase => 126 offenses
97
+ Style/VariableName:
98
+ EnforcedStyle: snake_case
99
+ Enabled: true
100
+
101
+ # EnforcedStyle: snake_case => 11 offenses
102
+ # EnforcedStyle: normalcase => 0 offense
103
+ # EnforcedStyle: non_integer => 11 offenses
104
+ Style/VariableNumber:
105
+ EnforcedStyle: normalcase
106
+ Enabled: true
107
+
108
+ Style/StringLiterals:
109
+ Enabled: false
110
+
111
+ Layout/SpaceAfterComma:
112
+ Enabled: false
113
+
114
+ Layout/SpaceAroundOperators:
115
+ Enabled: false
116
+
117
+ Layout/SpaceInsideBlockBraces:
118
+ Enabled: false
119
+
120
+ Style/UnneededPercentQ:
121
+ Enabled: false
122
+
123
+ Style/PercentQLiterals:
124
+ Enabled: false
125
+
126
+ Style/SpecialGlobalVars:
127
+ Enabled: false
128
+
129
+ Style/Encoding:
130
+ Enabled: false
131
+
132
+ Style/ParallelAssignment:
133
+ Enabled: false
134
+
135
+ Style/IfInsideElse:
136
+ Enabled: false
137
+
138
+ Style/PercentLiteralDelimiters:
139
+ Enabled: false
140
+
141
+ Style/ClassCheck:
142
+ Enabled: false
143
+
144
+ Style/RedundantBegin:
145
+ Enabled: false
146
+
147
+ Layout/EmptyLineAfterMagicComment:
148
+ Enabled: false
149
+
150
+ Style/AsciiComments:
151
+ Enabled: false
152
+
153
+ Style/LineEndConcatenation:
154
+ Enabled: false
155
+
156
+ Style/MethodCallWithoutArgsParentheses:
157
+ Enabled: false
158
+
159
+ Style/GlobalVars:
160
+ Enabled: false
161
+
162
+ Style/IfUnlessModifier:
163
+ Enabled: false
164
+
165
+ Style/NumericPredicate:
166
+ Enabled: false
167
+
168
+ Style/ZeroLengthPredicate:
169
+ Enabled: false
170
+
171
+ Layout/TrailingBlankLines:
172
+ Enabled: false
173
+
174
+ Metrics/AbcSize:
175
+ Enabled: true
176
+ Max: 260.05
177
+
178
+ Metrics/BlockLength:
179
+ Enabled: true
180
+ Max: 150
181
+
182
+ Metrics/BlockNesting:
183
+ Enabled: true
184
+ Max: 10
185
+
186
+ Metrics/ClassLength:
187
+ Enabled: true
188
+ Max: 2000
189
+
190
+ Metrics/CyclomaticComplexity:
191
+ Enabled: true
192
+ Max: 100
193
+
194
+ Metrics/LineLength:
195
+ Enabled: true
196
+ Max: 500
197
+
198
+ Metrics/MethodLength:
199
+ Enabled: true
200
+ Max: 200
201
+
202
+ Metrics/ModuleLength:
203
+ Enabled: true
204
+ Max: 100
205
+
206
+ Metrics/ParameterLists:
207
+ Enabled: true
208
+ Max: 10
209
+
210
+ Metrics/PerceivedComplexity:
211
+ Enabled: true
212
+ Max: 100
213
+
214
+
215
+ ###
216
+ Performance/RedundantMatch:
217
+ Enabled: false
218
+ Performance/StringReplacement:
219
+ Enabled: false
220
+ Layout/SpaceBeforeBlockBraces:
221
+ Enabled: false
222
+
223
+ ### あとで直す
224
+ Lint/StringConversionInInterpolation:
225
+ Enabled: false
226
+ Style/ClassAndModuleChildren:
227
+ Enabled: false
@@ -1,3 +1,36 @@
1
+ <a name="0.9.1"></a>
2
+ ## 0.9.1
3
+
4
+ ### Features
5
+
6
+ * 内部構造を改造した
7
+ * lib/t2hs.rbをUTF-8化した
8
+
9
+ <a name="0.9.0"></a>
10
+ ## 0.9.0
11
+
12
+ ### Features
13
+
14
+ * 内部構造を大改造した
15
+ * lib/t2hs.rb内で定義されているクラスをRubyの命名規則に合わせて変更し、外部ファイルにした
16
+ * `Aozora2Html.new(input, output)`の引数`input`,`output`でIOも受け取れるようにした
17
+ * `bin/aozora2html`にあったmonkey patchingも`lib/`以下に移動させた
18
+
19
+ <a name="0.7.1"></a>
20
+ ## 0.7.1
21
+
22
+ ### Bug Fixes
23
+
24
+ * `--use-unicode`オプションをつけていない時の外字処理を修正した
25
+ * くの字点が正しく処理されない場合があるのを修正した
26
+
27
+ <a name="0.7.0"></a>
28
+ ## 0.7.0
29
+
30
+ ### Features
31
+
32
+ * `--css-files`オプションを追加して、CSSを変更できるようにした
33
+
1
34
  <a name="0.6.1"></a>
2
35
  ## 0.6.1
3
36
 
data/LICENSE ADDED
@@ -0,0 +1,116 @@
1
+ CC0 1.0 Universal
2
+
3
+ Statement of Purpose
4
+
5
+ The laws of most jurisdictions throughout the world automatically confer
6
+ exclusive Copyright and Related Rights (defined below) upon the creator and
7
+ subsequent owner(s) (each and all, an "owner") of an original work of
8
+ authorship and/or a database (each, a "Work").
9
+
10
+ Certain owners wish to permanently relinquish those rights to a Work for the
11
+ purpose of contributing to a commons of creative, cultural and scientific
12
+ works ("Commons") that the public can reliably and without fear of later
13
+ claims of infringement build upon, modify, incorporate in other works, reuse
14
+ and redistribute as freely as possible in any form whatsoever and for any
15
+ purposes, including without limitation commercial purposes. These owners may
16
+ contribute to the Commons to promote the ideal of a free culture and the
17
+ further production of creative, cultural and scientific works, or to gain
18
+ reputation or greater distribution for their Work in part through the use and
19
+ efforts of others.
20
+
21
+ For these and/or other purposes and motivations, and without any expectation
22
+ of additional consideration or compensation, the person associating CC0 with a
23
+ Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
24
+ and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
25
+ and publicly distribute the Work under its terms, with knowledge of his or her
26
+ Copyright and Related Rights in the Work and the meaning and intended legal
27
+ effect of CC0 on those rights.
28
+
29
+ 1. Copyright and Related Rights. A Work made available under CC0 may be
30
+ protected by copyright and related or neighboring rights ("Copyright and
31
+ Related Rights"). Copyright and Related Rights include, but are not limited
32
+ to, the following:
33
+
34
+ i. the right to reproduce, adapt, distribute, perform, display, communicate,
35
+ and translate a Work;
36
+
37
+ ii. moral rights retained by the original author(s) and/or performer(s);
38
+
39
+ iii. publicity and privacy rights pertaining to a person's image or likeness
40
+ depicted in a Work;
41
+
42
+ iv. rights protecting against unfair competition in regards to a Work,
43
+ subject to the limitations in paragraph 4(a), below;
44
+
45
+ v. rights protecting the extraction, dissemination, use and reuse of data in
46
+ a Work;
47
+
48
+ vi. database rights (such as those arising under Directive 96/9/EC of the
49
+ European Parliament and of the Council of 11 March 1996 on the legal
50
+ protection of databases, and under any national implementation thereof,
51
+ including any amended or successor version of such directive); and
52
+
53
+ vii. other similar, equivalent or corresponding rights throughout the world
54
+ based on applicable law or treaty, and any national implementations thereof.
55
+
56
+ 2. Waiver. To the greatest extent permitted by, but not in contravention of,
57
+ applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
58
+ unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
59
+ and Related Rights and associated claims and causes of action, whether now
60
+ known or unknown (including existing as well as future claims and causes of
61
+ action), in the Work (i) in all territories worldwide, (ii) for the maximum
62
+ duration provided by applicable law or treaty (including future time
63
+ extensions), (iii) in any current or future medium and for any number of
64
+ copies, and (iv) for any purpose whatsoever, including without limitation
65
+ commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
66
+ the Waiver for the benefit of each member of the public at large and to the
67
+ detriment of Affirmer's heirs and successors, fully intending that such Waiver
68
+ shall not be subject to revocation, rescission, cancellation, termination, or
69
+ any other legal or equitable action to disrupt the quiet enjoyment of the Work
70
+ by the public as contemplated by Affirmer's express Statement of Purpose.
71
+
72
+ 3. Public License Fallback. Should any part of the Waiver for any reason be
73
+ judged legally invalid or ineffective under applicable law, then the Waiver
74
+ shall be preserved to the maximum extent permitted taking into account
75
+ Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
76
+ is so judged Affirmer hereby grants to each affected person a royalty-free,
77
+ non transferable, non sublicensable, non exclusive, irrevocable and
78
+ unconditional license to exercise Affirmer's Copyright and Related Rights in
79
+ the Work (i) in all territories worldwide, (ii) for the maximum duration
80
+ provided by applicable law or treaty (including future time extensions), (iii)
81
+ in any current or future medium and for any number of copies, and (iv) for any
82
+ purpose whatsoever, including without limitation commercial, advertising or
83
+ promotional purposes (the "License"). The License shall be deemed effective as
84
+ of the date CC0 was applied by Affirmer to the Work. Should any part of the
85
+ License for any reason be judged legally invalid or ineffective under
86
+ applicable law, such partial invalidity or ineffectiveness shall not
87
+ invalidate the remainder of the License, and in such case Affirmer hereby
88
+ affirms that he or she will not (i) exercise any of his or her remaining
89
+ Copyright and Related Rights in the Work or (ii) assert any associated claims
90
+ and causes of action with respect to the Work, in either case contrary to
91
+ Affirmer's express Statement of Purpose.
92
+
93
+ 4. Limitations and Disclaimers.
94
+
95
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
96
+ surrendered, licensed or otherwise affected by this document.
97
+
98
+ b. Affirmer offers the Work as-is and makes no representations or warranties
99
+ of any kind concerning the Work, express, implied, statutory or otherwise,
100
+ including without limitation warranties of title, merchantability, fitness
101
+ for a particular purpose, non infringement, or the absence of latent or
102
+ other defects, accuracy, or the present or absence of errors, whether or not
103
+ discoverable, all to the greatest extent permissible under applicable law.
104
+
105
+ c. Affirmer disclaims responsibility for clearing rights of other persons
106
+ that may apply to the Work or any use thereof, including without limitation
107
+ any person's Copyright and Related Rights in the Work. Further, Affirmer
108
+ disclaims responsibility for obtaining any necessary consents, permissions
109
+ or other rights required for any use of the Work.
110
+
111
+ d. Affirmer understands and acknowledges that Creative Commons is not a
112
+ party to this document and has no duty or obligation with respect to this
113
+ CC0 or use of the Work.
114
+
115
+ For more information, please see
116
+ <http://creativecommons.org/publicdomain/zero/1.0/>
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Aozora2Html
2
2
 
3
- [![Build Status](https://travis-ci.org/aozorahack/aozora2html.svg?branch=master)](https://travis-ci.org/aozorahack/aozora2html) [![Gem Version](https://badge.fury.io/rb/aozora2html.svg)](https://badge.fury.io/rb/aozora2html) [![Build Status](https://ci.appveyor.com/api/projects/status/9ds6wksavm50ha9v/branch/master?svg=true)](https://ci.appveyor.com/project/takahashim/aozora2html/branch/master) [![Code Climate](https://codeclimate.com/github/aozorahack/aozora2html/badges/gpa.svg)](https://codeclimate.com/github/aozorahack/aozora2html)
3
+ [![Build Status](https://travis-ci.org/aozorahack/aozora2html.svg?branch=master)](https://travis-ci.org/aozorahack/aozora2html)
4
+ [![Build Status](https://github.com/aozorahack/aozora2html/workflows/Test/badge.svg)](https://github.com/aozorahack/aozora2html/actions)
5
+ [![Gem Version](https://badge.fury.io/rb/aozora2html.svg)](https://badge.fury.io/rb/aozora2html)
6
+ [![Code Climate](https://codeclimate.com/github/aozorahack/aozora2html/badges/gpa.svg)](https://codeclimate.com/github/aozorahack/aozora2html)
4
7
 
5
8
  青空文庫の「組版案内」( http://kumihan.aozora.gr.jp/ )で配布されているtxt2html内にあるt2hs.rbを改造するプロジェクトです。
6
9
 
@@ -79,4 +82,6 @@ $ rake test
79
82
 
80
83
  CC0
81
84
 
85
+ [![CC0](http://i.creativecommons.org/p/zero/1.0/88x31.png "CC0")](http://creativecommons.org/publicdomain/zero/1.0/deed.ja)
86
+
82
87
  To the extent possible under law, 青空文庫 has waived all copyright and related or neighboring rights to txt2xhtml. This work is published from Japan.
@@ -21,15 +21,13 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ["lib"]
23
23
 
24
- spec.add_dependency "rubyzip"
24
+ if RUBY_VERSION < "2.4.0"
25
+ spec.add_dependency "rubyzip", "~> 1.3"
26
+ else
27
+ spec.add_dependency "rubyzip", "~> 2.0"
28
+ end
25
29
  spec.add_development_dependency "bundler"
26
- spec.add_development_dependency "rake", "~> 10.0"
30
+ spec.add_development_dependency "rake", "~> 12.0"
27
31
  spec.add_development_dependency "test-unit"
28
32
  spec.add_development_dependency "test-unit-rr"
29
- # spec.add_development_dependency "test-unit-notify"
30
- # spec.add_development_dependency "terminal-notifier"
31
- if RUBY_VERSION > "2.2.0"
32
- spec.add_development_dependency "guard"
33
- spec.add_development_dependency "guard-test"
34
- end
35
33
  end