file_manipulator 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.
- checksums.yaml +4 -4
- data/Gemfile +4 -4
- data/Gemfile.lock +6 -6
- data/README.md +2 -2
- data/lib/file_manipulator/merger.rb +1 -1
- data/lib/file_manipulator/splitter.rb +1 -6
- data/lib/file_manipulator/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a021b26713519ceca3325fc379e92005dc01c4a
|
4
|
+
data.tar.gz: 365b700976dba9afae6eda948ae563d4a6a4f50c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a9886789d3cc814d9c33491294a75ffef91e0198f385e0845b1051900a19fca17cbaeb3a26087ba63be7ea6f070488f1b67d66073572818144034166d1527c2
|
7
|
+
data.tar.gz: 6683b2e825e36a55154cfb031465c2d9a5d57685118e561b1abed257f703cf48d4e5a3331c6ee392ca61d5305832c001d95453b8fe40408daece14e499c2ceec
|
data/Gemfile
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
gem 'rails'
|
4
|
-
gem 'rake'
|
4
|
+
gem 'rake'
|
5
5
|
|
6
6
|
group :development, :test do
|
7
|
-
gem 'pry'
|
8
|
-
gem 'pry-byebug'
|
7
|
+
gem 'pry'
|
8
|
+
gem 'pry-byebug'
|
9
9
|
end
|
10
10
|
|
11
11
|
group :test do
|
12
12
|
gem 'simplecov'
|
13
13
|
gem 'codeclimate-test-reporter', require: true
|
14
|
-
gem 'rspec'
|
14
|
+
gem 'rspec'
|
15
15
|
end
|
16
16
|
|
17
17
|
gemspec
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
file_manipulator (0.1.
|
4
|
+
file_manipulator (0.1.3)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -105,7 +105,7 @@ GEM
|
|
105
105
|
method_source
|
106
106
|
rake (>= 0.8.7)
|
107
107
|
thor (>= 0.18.1, < 2.0)
|
108
|
-
rake (
|
108
|
+
rake (11.3.0)
|
109
109
|
rspec (3.5.0)
|
110
110
|
rspec-core (~> 3.5.0)
|
111
111
|
rspec-expectations (~> 3.5.0)
|
@@ -147,11 +147,11 @@ DEPENDENCIES
|
|
147
147
|
bundler (~> 1.13)
|
148
148
|
codeclimate-test-reporter
|
149
149
|
file_manipulator!
|
150
|
-
pry
|
151
|
-
pry-byebug
|
150
|
+
pry
|
151
|
+
pry-byebug
|
152
152
|
rails
|
153
|
-
rake
|
154
|
-
rspec
|
153
|
+
rake
|
154
|
+
rspec
|
155
155
|
simplecov
|
156
156
|
|
157
157
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -55,9 +55,9 @@ Dir.entries('tmp')
|
|
55
55
|
|
56
56
|
## Development
|
57
57
|
|
58
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
58
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
59
59
|
|
60
|
-
To install this gem onto your local machine, run `
|
60
|
+
To install this gem onto your local machine, run `bin/rake install`. To release a new version, update the version number in `version.rb`, build the gem by `bin/rake build`, commit and push the repository with `git`, and then run `bin/rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
61
61
|
|
62
62
|
## Contributing
|
63
63
|
|
@@ -10,7 +10,7 @@ module FileManipulator
|
|
10
10
|
string_io = StringIO.new
|
11
11
|
|
12
12
|
Dir.glob("#{config.split_files_directory}/#{config.prefix}_*").sort.each do |file|
|
13
|
-
string_io.
|
13
|
+
string_io.write File.read(file)
|
14
14
|
end
|
15
15
|
|
16
16
|
File.write(merged_file, string_io.string)
|
@@ -12,12 +12,7 @@ module FileManipulator
|
|
12
12
|
File.open(file_name, 'r') do |input|
|
13
13
|
until input.eof?
|
14
14
|
File.open(File.join(config.split_files_directory, output_file_name(index)), 'w') do |output|
|
15
|
-
|
16
|
-
|
17
|
-
while output.size <= (config.size - line.length) && !input.eof?
|
18
|
-
line = input.readline
|
19
|
-
output << line
|
20
|
-
end
|
15
|
+
output << input.read(config.size)
|
21
16
|
end
|
22
17
|
|
23
18
|
index += 1
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: file_manipulator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Atsushi Ishida
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|