enco 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +2 -0
- data/CONTRIBUTING.md +12 -53
- data/LICENSE +1 -1
- data/README.md +5 -0
- data/enco.gemspec +2 -1
- data/lib/enco/version.rb +1 -1
- data/spec/enco_spec.rb +5 -5
- metadata +11 -10
data/.travis.yml
CHANGED
data/CONTRIBUTING.md
CHANGED
|
@@ -8,22 +8,7 @@ Enco is an open source project. Anyone can use the code, but more importantly, a
|
|
|
8
8
|
* How to contribute fixes and improvements to the core
|
|
9
9
|
* Information on how to improve the documentation
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
----------------------
|
|
13
|
-
Enco is an open source project and as such contributions are always welcome. Our community is one which
|
|
14
|
-
encourages involvement from all developers regardless of their ability level. We ask that you be patient with the
|
|
15
|
-
other members of the community and maintain a respectful attitude towards other people’s work. Open source is a
|
|
16
|
-
great way to learn a new technology so don’t be afraid to jump right in, even if you are new to Ruby/Rails.
|
|
17
|
-
|
|
18
|
-
2. Before you Contribute
|
|
19
|
-
------------------------
|
|
20
|
-
Open source projects tend to be a collaborative effort. Since many people are relying upon Enco for their real
|
|
21
|
-
world applications, changes to the code can have major implications. Before you write a bug fix or code a new
|
|
22
|
-
feature, you should find out if anybody is interested in your proposed change. You may find that the thing you’re
|
|
23
|
-
trying to “fix” is actually desired behavior. You might also discover that someone else is working on it. Either
|
|
24
|
-
way you can save yourself valuable time by announcing your intentions before starting work.
|
|
25
|
-
|
|
26
|
-
### 2.1. Notification via Ticket
|
|
11
|
+
### Notification via Ticket
|
|
27
12
|
|
|
28
13
|
You can also search existing bug reports/issues and file a new one if you do not find an issue relevant to your
|
|
29
14
|
proposed change. See Filing an Issue for more details.
|
|
@@ -32,15 +17,12 @@ The important thing is that you communicate your intention in advance of doing a
|
|
|
32
17
|
non-controversial changes do not require this approach but you can save some time by suggesting an improvement and
|
|
33
18
|
having it rejected before you write a bunch of the code.
|
|
34
19
|
|
|
35
|
-
|
|
36
|
-
|
|
20
|
+
## Filing an Issue
|
|
21
|
+
|
|
37
22
|
If you would like to file a bug report, please create an issue in our Github Issues Tracker. You should do a basic
|
|
38
23
|
search of the issues database before creating a new issue to ensure that you are not creating a duplicate issue.
|
|
39
24
|
|
|
40
|
-
|
|
41
|
-
ticket is handled in the appropriate manner.
|
|
42
|
-
|
|
43
|
-
### 3.1. Providing a Patch
|
|
25
|
+
### Providing a Patch
|
|
44
26
|
|
|
45
27
|
If you are filing and issue and supplying a patch at the same time, please file a Pull Request instead. The pull
|
|
46
28
|
request will also create an issue at the same time but its superior to just creating an issue because the code and
|
|
@@ -56,37 +38,15 @@ If the ticket already exists, however, and you want to supply a patch after the
|
|
|
56
38
|
Github will automatically detect this commit message when you push it and link the issue. Please see the detailed
|
|
57
39
|
Github Issues blog post for more details.
|
|
58
40
|
|
|
59
|
-
###
|
|
41
|
+
### Feature Requests
|
|
60
42
|
|
|
61
|
-
We’re interested in hearing your ideas for new features
|
|
62
|
-
the proper way to ask for a feature. A feature request is any idea you have to improve the software experience that
|
|
43
|
+
We’re interested in hearing your ideas for new features. A feature request is any idea you have to improve the software experience that
|
|
63
44
|
is not strictly related to a bug or error of omission.
|
|
64
45
|
|
|
65
46
|
Feature requests that are accompanied by source code are always welcome. In this case you should read the next
|
|
66
47
|
section on Creating a Pull Request.
|
|
67
48
|
|
|
68
|
-
|
|
69
|
-
through our Issue Tracker. If you want to suggest a feature, please use the mailing list or the user voice forum.
|
|
70
|
-
|
|
71
|
-
### 3.3. How We Prioritize Issues
|
|
72
|
-
|
|
73
|
-
We try our best to respond to all of the questions and issues our users have. We use the following criteria to
|
|
74
|
-
prioritize issues:
|
|
75
|
-
|
|
76
|
-
* Does this bug effect the latest stable release?
|
|
77
|
-
* Is there a patch associated with the issue?
|
|
78
|
-
* Is ther a test included in the patch?
|
|
79
|
-
* Has someone else verified the bug?
|
|
80
|
-
* Are there details on how to reproduce the problem?
|
|
81
|
-
* We give highest priority to issues where the answer is “yes” to all of these questions. Next highest priority is for
|
|
82
|
-
issues that answer “yes” to most of these questions, particularly the first few criteria.
|
|
83
|
-
|
|
84
|
-
You need to include a brief description of the problem and simple steps needed to reproduce it. If you fail to
|
|
85
|
-
supply this minimum level of information your issue will likely be ignored.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
4. Creating a Pull Request
|
|
89
|
-
--------------------------
|
|
49
|
+
## Creating a Pull Request
|
|
90
50
|
|
|
91
51
|
If you are going to contribute code to the Enco project, the best mechanism for doing this is to create a pull
|
|
92
52
|
request in Github. If you’re unfamiliar with the general concept of pull requests you may want to read more on pull
|
|
@@ -94,7 +54,7 @@ If you are going to contribute code to the Enco project, the best mechanism for
|
|
|
94
54
|
|
|
95
55
|
If your code is associated with an existing issue then you can provide a patch instead of creating a pull request.
|
|
96
56
|
|
|
97
|
-
###
|
|
57
|
+
### Creating a Fork
|
|
98
58
|
|
|
99
59
|
The official Enco source code is maintained in Github under the AlexParamonov/enco
|
|
100
60
|
|
|
@@ -102,7 +62,7 @@ You simply need to “fork” the project and then start hacking.
|
|
|
102
62
|
|
|
103
63
|
See the Github guide on creating forks for more details.
|
|
104
64
|
|
|
105
|
-
###
|
|
65
|
+
### Topic Branches
|
|
106
66
|
|
|
107
67
|
Git branches are “cheap.” Creating branches in Git is incredibly easy and its an ideal way to isolate a specific set
|
|
108
68
|
of changes. You may be fixing several things at one time but by keeping your changes isolated it will help us to
|
|
@@ -138,7 +98,7 @@ You should probably also clean up after yourself a little. The branch has been p
|
|
|
138
98
|
|
|
139
99
|
$ git branch -D fix-css-for-error-flash
|
|
140
100
|
|
|
141
|
-
###
|
|
101
|
+
### Including a Test
|
|
142
102
|
|
|
143
103
|
Ideally your pull request will also include a test that verifies a bug (or the absence of the new feature) before
|
|
144
104
|
your fix and also verifies proper functionality when you are finished. Please read the Testing Guide for more
|
|
@@ -146,7 +106,7 @@ Ideally your pull request will also include a test that verifies a bug (or the a
|
|
|
146
106
|
|
|
147
107
|
Pull requests with tests are given top priority. Failure to include a test will likely delay acceptance of your patch.
|
|
148
108
|
|
|
149
|
-
###
|
|
109
|
+
### Creating the Pull Request
|
|
150
110
|
|
|
151
111
|
Once your code is ready to go and you have pushed your topic branch to Github then you are ready to create the pull
|
|
152
112
|
request and notify the Enco team that your contribution is ready. You do this by browsing your project in
|
|
@@ -156,6 +116,5 @@ Once your code is ready to go and you have pushed your topic branch to Github th
|
|
|
156
116
|
The Github guide on pull requests describes this in more detail with screenshots if you’re still confused on this
|
|
157
117
|
part.
|
|
158
118
|
|
|
159
|
-
|
|
160
|
-
-----------------------------------
|
|
119
|
+
## Contributing to the Documentation
|
|
161
120
|
Improvements to the documentation is encouraged.
|
data/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright (c) 2011 Alexander N Paramonov
|
|
1
|
+
Copyright (c) 2011-2012 Alexander N Paramonov
|
|
2
2
|
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
4
4
|
documentation files (the "Software"), to deal in the Software without restriction,
|
data/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
Enco
|
|
2
2
|
==========
|
|
3
|
+
[](http://travis-ci.org/AlexParamonov/enco)
|
|
4
|
+
[](http://gemnasium.com/AlexParamonov/enco)
|
|
5
|
+
|
|
3
6
|
Enco will convert any string to utf-8, based on original string encoding.
|
|
4
7
|
|
|
5
8
|
Installation
|
|
@@ -46,6 +49,8 @@ tested with Ruby
|
|
|
46
49
|
|
|
47
50
|
* 1.9.2
|
|
48
51
|
* 1.9.3
|
|
52
|
+
* jruby-19mode
|
|
53
|
+
* rbx-19mode
|
|
49
54
|
* ruby-head
|
|
50
55
|
|
|
51
56
|
see [build history](http://travis-ci.org/#!/AlexParamonov/enco/builds)
|
data/enco.gemspec
CHANGED
|
@@ -9,7 +9,8 @@ Gem::Specification.new do |s|
|
|
|
9
9
|
s.email = ["alexander.n.paramonov@gmail.com"]
|
|
10
10
|
s.homepage = "http://github.com/AlexParamonov/enco"
|
|
11
11
|
s.summary = %q{Enco will convert any string to utf-8, based on original string encoding.}
|
|
12
|
-
s.description = %q{
|
|
12
|
+
s.description = %q{Enco can convert any string to utf-8, based on it original encoding.
|
|
13
|
+
Converting string to utf-8 never was so simple as with Enco!}
|
|
13
14
|
|
|
14
15
|
s.rubyforge_project = "enco"
|
|
15
16
|
|
data/lib/enco/version.rb
CHANGED
data/spec/enco_spec.rb
CHANGED
|
@@ -24,32 +24,32 @@ describe Enco do
|
|
|
24
24
|
context "a string in" do
|
|
25
25
|
specify "UTF-8 encoding" do
|
|
26
26
|
result = Enco.to_utf8(string_in 'UTF-8')
|
|
27
|
-
result.should eq @cyrillic_string + "UTF-8\n"
|
|
28
27
|
result.encoding.to_s.should == "UTF-8"
|
|
28
|
+
result.should eq @cyrillic_string + "UTF-8\n"
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
specify "KOI8-R encoding" do
|
|
32
32
|
result = Enco.to_utf8(string_in 'KOI8-R')
|
|
33
|
-
result.should eq @cyrillic_string + "KOI8-R\n"
|
|
34
33
|
result.encoding.to_s.should == "UTF-8"
|
|
34
|
+
result.should eq @cyrillic_string + "KOI8-R\n"
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
specify "CP866 encoding" do
|
|
38
38
|
result = Enco.to_utf8(string_in 'CP866')
|
|
39
|
-
result.should eq @cyrillic_string + "CP866\n"
|
|
40
39
|
result.encoding.to_s.should == "UTF-8"
|
|
40
|
+
result.should eq @cyrillic_string + "CP866\n"
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
specify "ISO-8859-15 encoding" do
|
|
44
44
|
result = Enco.to_utf8(string_in 'ISO-8859-15')
|
|
45
|
-
result.should eq @simple_string + "ISO-8859-15\n"
|
|
46
45
|
result.encoding.to_s.should == "UTF-8"
|
|
46
|
+
result.should eq @simple_string + "ISO-8859-15\n"
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
specify "WINDOWS-1251 encoding" do
|
|
50
50
|
result = Enco.to_utf8(string_in 'WINDOWS-1251')
|
|
51
|
-
result.should eq @cyrillic_string + "WINDOWS-1251\n"
|
|
52
51
|
result.encoding.to_s.should == "UTF-8"
|
|
52
|
+
result.should eq @cyrillic_string + "WINDOWS-1251\n"
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
55
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: enco
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,11 +9,11 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-
|
|
12
|
+
date: 2012-02-21 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rspec
|
|
16
|
-
requirement: &
|
|
16
|
+
requirement: &16542660 !ruby/object:Gem::Requirement
|
|
17
17
|
none: false
|
|
18
18
|
requirements:
|
|
19
19
|
- - ! '>='
|
|
@@ -21,10 +21,10 @@ dependencies:
|
|
|
21
21
|
version: '2.6'
|
|
22
22
|
type: :development
|
|
23
23
|
prerelease: false
|
|
24
|
-
version_requirements: *
|
|
24
|
+
version_requirements: *16542660
|
|
25
25
|
- !ruby/object:Gem::Dependency
|
|
26
26
|
name: rake
|
|
27
|
-
requirement: &
|
|
27
|
+
requirement: &16541820 !ruby/object:Gem::Requirement
|
|
28
28
|
none: false
|
|
29
29
|
requirements:
|
|
30
30
|
- - ! '>='
|
|
@@ -32,10 +32,10 @@ dependencies:
|
|
|
32
32
|
version: '0'
|
|
33
33
|
type: :development
|
|
34
34
|
prerelease: false
|
|
35
|
-
version_requirements: *
|
|
35
|
+
version_requirements: *16541820
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: rchardet19
|
|
38
|
-
requirement: &
|
|
38
|
+
requirement: &16541140 !ruby/object:Gem::Requirement
|
|
39
39
|
none: false
|
|
40
40
|
requirements:
|
|
41
41
|
- - ! '>='
|
|
@@ -43,8 +43,9 @@ dependencies:
|
|
|
43
43
|
version: '0'
|
|
44
44
|
type: :runtime
|
|
45
45
|
prerelease: false
|
|
46
|
-
version_requirements: *
|
|
47
|
-
description:
|
|
46
|
+
version_requirements: *16541140
|
|
47
|
+
description: ! "Enco can convert any string to utf-8, based on it original encoding.
|
|
48
|
+
\nConverting string to utf-8 never was so simple as with Enco!"
|
|
48
49
|
email:
|
|
49
50
|
- alexander.n.paramonov@gmail.com
|
|
50
51
|
executables: []
|
|
@@ -93,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
93
94
|
version: '0'
|
|
94
95
|
requirements: []
|
|
95
96
|
rubyforge_project: enco
|
|
96
|
-
rubygems_version: 1.8.
|
|
97
|
+
rubygems_version: 1.8.10
|
|
97
98
|
signing_key:
|
|
98
99
|
specification_version: 3
|
|
99
100
|
summary: Enco will convert any string to utf-8, based on original string encoding.
|