strings 0.1.8 → 0.2.0

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.
@@ -1,15 +0,0 @@
1
- # encoding: utf-8
2
-
3
- RSpec.describe Strings, '#wrap' do
4
- it "wraps text" do
5
- text = 'ラドクリフ、マラソン五輪代表に1万m出場にも含み'
6
- expect(Strings.wrap(text, 8)).to eql([
7
- "ラドクリ",
8
- "フ、マラ",
9
- "ソン五輪",
10
- "代表に1",
11
- "万m出場",
12
- "にも含み"
13
- ].join("\n"))
14
- end
15
- end
@@ -1,34 +0,0 @@
1
- lib = File.expand_path("../lib", __FILE__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "strings/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "strings"
7
- spec.version = Strings::VERSION
8
- spec.authors = ["Piotr Murach"]
9
- spec.email = ["me@piotrmurach.com"]
10
- spec.summary = %q{A set of useful functions for transforming strings.}
11
- spec.description = %q{A set of useful functions such as fold, truncate, wrap and more for transoforming strings.}
12
- spec.homepage = "https://github.com/piotrmurach/strings"
13
- spec.license = "MIT"
14
-
15
- spec.metadata["allowed_push_host"] = "https://rubygems.org"
16
- spec.metadata["changelog_uri"] = "https://github.com/piotrmurach/strings/blob/master/CHANGELOG.md"
17
- spec.metadata["documentation_uri"] = "https://www.rubydoc.info/gems/strings"
18
- spec.metadata["homepage_uri"] = spec.homepage
19
- spec.metadata["source_code_uri"] = "https://github.com/piotrmurach/strings"
20
-
21
- spec.files = Dir['{lib,spec}/**/*.rb', '{bin,tasks}/*', 'strings.gemspec']
22
- spec.files += Dir['README.md', 'CHANGELOG.md', 'LICENSE.txt', 'Rakefile']
23
- spec.bindir = "exe"
24
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
- spec.require_paths = ["lib"]
26
-
27
- spec.add_dependency "strings-ansi", "~> 0.1"
28
- spec.add_dependency "unicode_utils", "~> 1.4"
29
- spec.add_dependency "unicode-display_width", "~> 1.5"
30
-
31
- spec.add_development_dependency "bundler", ">= 1.5"
32
- spec.add_development_dependency "rake"
33
- spec.add_development_dependency "rspec", ">= 3.0"
34
- end
@@ -1,9 +0,0 @@
1
- desc "Load gem inside irb console"
2
- task :console do
3
- require "irb"
4
- require "irb/completion"
5
- require File.join(__FILE__, "../../lib/strings")
6
- ARGV.clear
7
- IRB.start
8
- end
9
- task c: %w[ console ]
@@ -1,11 +0,0 @@
1
- # encoding: utf-8
2
-
3
- desc 'Measure code coverage'
4
- task :coverage do
5
- begin
6
- original, ENV['COVERAGE'] = ENV['COVERAGE'], 'true'
7
- Rake::Task['spec'].invoke
8
- ensure
9
- ENV['COVERAGE'] = original
10
- end
11
- end
@@ -1,29 +0,0 @@
1
- # encoding: utf-8
2
-
3
- begin
4
- require 'rspec/core/rake_task'
5
-
6
- desc 'Run all specs'
7
- RSpec::Core::RakeTask.new(:spec) do |task|
8
- task.pattern = 'spec/{unit,integration}{,/*/**}/*_spec.rb'
9
- end
10
-
11
- namespace :spec do
12
- desc 'Run unit specs'
13
- RSpec::Core::RakeTask.new(:unit) do |task|
14
- task.pattern = 'spec/unit{,/*/**}/*_spec.rb'
15
- end
16
-
17
- desc 'Run integration specs'
18
- RSpec::Core::RakeTask.new(:integration) do |task|
19
- task.pattern = 'spec/integration{,/*/**}/*_spec.rb'
20
- end
21
- end
22
-
23
- rescue LoadError
24
- %w[spec spec:unit spec:integration].each do |name|
25
- task name do
26
- $stderr.puts "In order to run #{name}, do `gem install rspec`"
27
- end
28
- end
29
- end