File tree 4 files changed +31
-5
lines changed
4 files changed +31
-5
lines changed Original file line number Diff line number Diff line change 1
1
require "bundler/gem_tasks"
2
+ Dir . glob ( 'tasks/**/*.rake' ) . each ( &method ( :import ) )
Original file line number Diff line number Diff line change 1
1
require "pageinfo/version"
2
2
3
3
module Pageinfo
4
- # Your code goes here...
4
+ def self . process ( str )
5
+ # TODO: process `str`
6
+ str
7
+ end
5
8
end
Original file line number Diff line number Diff line change @@ -6,12 +6,12 @@ require 'pageinfo/version'
6
6
Gem ::Specification . new do |spec |
7
7
spec . name = "pageinfo"
8
8
spec . version = Pageinfo ::VERSION
9
- spec . authors = [ "Aditia Mahdar Ganteng " ]
9
+ spec . authors = [ "aditiamahdar " ]
10
10
spec . email = [ "[email protected] " ]
11
11
12
- spec . summary = %q{TODO: Write a short summary, because Rubygems requires one .}
13
- spec . description = %q{TODO: Write a longer description or delete this line .}
14
- spec . homepage = "TODO: Put your gem's website or public repo URL here. "
12
+ spec . summary = %q{Browse your page meta info and optimize your SEO strategy .}
13
+ spec . description = %q{pageinfo will browse through your site then list every page on your site and give detail meta info about the page .}
14
+ # spec.homepage = "# "
15
15
spec . license = "MIT"
16
16
17
17
spec . files = `git ls-files -z` . split ( "\x0 " ) . reject { |f | f . match ( %r{^(test|spec|features)/} ) }
@@ -25,4 +25,5 @@ Gem::Specification.new do |spec|
25
25
26
26
spec . add_development_dependency "bundler" , "~> 1.9"
27
27
spec . add_development_dependency "rake" , "~> 10.0"
28
+ spec . add_development_dependency "rspec"
28
29
end
Original file line number Diff line number Diff line change 8
8
it 'does something useful' do
9
9
expect ( false ) . to eq ( true )
10
10
end
11
+
12
+ subject { Pageinfo . new }
13
+
14
+ describe "#process" do
15
+ let ( :input ) { "My grandmom gave me a sweater for Christmas." }
16
+ let ( :output ) { subject . process ( input ) }
17
+
18
+ it 'converts to lowercase' do
19
+ expect ( output . downcase ) . to eq output
20
+ end
21
+
22
+ it 'combines nouns with doge adjectives' do
23
+ expect ( output ) . to match /so grandmom./i
24
+ expect ( output ) . to match /such sweater./i
25
+ expect ( output ) . to match /very christmas./i
26
+ end
27
+
28
+ it 'always appends "wow."' do
29
+ expect ( output ) . to end_with 'wow.'
30
+ end
31
+ end
11
32
end
You can’t perform that action at this time.
0 commit comments