slurper 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +178 -0
  3. data/lib/slurper/engine.rb +7 -5
  4. metadata +8 -9
  5. data/README.rdoc +0 -124
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7f431cd179fd7aebd44ae9faca7dba74728a68d1
4
- data.tar.gz: e3c062a31514b3a39c73da68b9618ecb1f0388d7
2
+ SHA256:
3
+ metadata.gz: d7ad469b5b86f770946fd6978a298dd60941f7f8dd157eca273df353a7a1efcb
4
+ data.tar.gz: 1f4fdd99c8ed322e0e448f585e1cbe2cb1d11d6e4921a645161f2dbf7e13f4a9
5
5
  SHA512:
6
- metadata.gz: 7248112fd89f8d81bdcae4da1364c2da793e5f0e935e09b1fc57a9a1992e50c5a635b237386e8691e41abfefc90cb8be043e85f13d177f7ab904e85b95892fb9
7
- data.tar.gz: fb5295fcc2e9033157e871d946d175345b1e6cf0a29e354854ab07d83cfccba4f1fb2deab5a1ed900959b3fe19aa3c5c711ece40d4115453ca1e9d1312a38314
6
+ metadata.gz: d6f60aac05245772463dafd917ea0ab88a4519d8c3ec1c4ce3f029a579fb0f56e9191dae265d6bae17b688bce6c15edcb5ca41e8a8b98886771f5e30c7e04029
7
+ data.tar.gz: 802b5f1b7eab3b0a86eb61dccc85e4c364aba5f2045130f899c7ae99d8357156020d7c4d2108c39eadf511b49056c232e05172fc1fab0bf54cc004e410173fbc
@@ -0,0 +1,178 @@
1
+ # slurper
2
+
3
+ Slurper allows you to quickly compose your stories in a text file and import
4
+ them into Pivotal Tracker.
5
+
6
+ Works great with [slurper.vim](http://github.com/adamlowe/vim-slurper)!
7
+
8
+ ## Install
9
+
10
+ ```
11
+ $ gem install slurper
12
+ ```
13
+
14
+ ## Config
15
+
16
+ Slurper requires a `slurper_config.yml `file in your working directory. This file
17
+ contains your Tracker API and story requestor information.
18
+
19
+ ### Example
20
+
21
+ ```yml
22
+ # slurper_config.yml
23
+
24
+ project_id: 1234
25
+ token: 123abc123abc123abc
26
+ requested_by: Jane Stakeholder
27
+ ```
28
+
29
+ The `project_id` tells tracker which project to add your stories to. It can be
30
+ found on the project settings or the URL for the project.
31
+
32
+ The `token` can be found on your personal profile page in Pivotal Tracker.
33
+
34
+ The `requested_by` field should be the name of your project stakeholder exactly
35
+ as it appears in tracker.
36
+
37
+ ## Usage
38
+
39
+ Create a `stories.slurper` file and compose your stories in the Slurper story
40
+ format. In your working directory use the slurp command to import your stories
41
+ from the `stories.slurper` file into Pivotal Tracker. Slurper looks for a
42
+ `stories.slurper` file in your current directory by default; however, you can
43
+ provide an alternate story source file if necessary.
44
+
45
+ Default
46
+
47
+ ```
48
+ $ slurp ~/stories.slurper
49
+ ```
50
+
51
+ Also valid
52
+
53
+ ```
54
+ $ slurp ~/special_stories.slurper
55
+ ```
56
+
57
+ Or even
58
+
59
+ ```
60
+ $ slurp ~/mystories.txt
61
+ ```
62
+
63
+ ### Example Stories
64
+
65
+ ```
66
+ /* stories.slurper */
67
+
68
+ ==
69
+ story_type:
70
+ chore
71
+ name:
72
+ Set Up Staging Environment
73
+ description:
74
+ Set up and configure staging environment for approval of stories
75
+
76
+ labels:
77
+ staging
78
+ ==
79
+ story_type:
80
+ feature
81
+ name:
82
+ Campaign Manager Does Something
83
+ description:
84
+ In order to get some value
85
+ As a campaign manager
86
+ I want to do something
87
+
88
+ - can do something
89
+
90
+ labels:
91
+ campaign managers
92
+ ==
93
+ story_type:
94
+ release
95
+ name:
96
+ Big Release
97
+ description:
98
+ This release marks a lot of awesome functionality
99
+
100
+ labels:
101
+ campaign managers
102
+ ==
103
+ story_type:
104
+ bug
105
+ name:
106
+ I did something and nothing happened
107
+ description:
108
+ When I do something, another thing is supposed to happen but I see an error screen instead.
109
+
110
+ labels:
111
+ campaign managers
112
+ ```
113
+
114
+ Note: the story source file is whitespace-sensitive. Be sure the value for each
115
+ key phrase is indented with two spaces beneath each key phrase. Also, start
116
+ each story with a double-equals on its own line.
117
+
118
+ Your best bet is to leverage
119
+ [slurper.vim](http://github.com/adamlowe/vim-slurper) and benefit from its
120
+ auto-indenting goodness.
121
+
122
+ ### Example Stories (Advanced)
123
+
124
+ There are some advanced techniques for formatting your stories beyond the
125
+ simple type, name, description and label fields. See below for some examples.
126
+
127
+ ```
128
+ /* advanced.slurper */
129
+
130
+ ==
131
+ story_type:
132
+ feature
133
+ name:
134
+ Make the cart accept coupons on checkout
135
+ description:
136
+ When I get to the checkout phase, I want the ability to add an optional coupon code. Use TESTCOUPON to test with.
137
+ labels:
138
+ cart,coupon system,checkout
139
+ estimate:
140
+ 3
141
+ requested_by:
142
+ Joe Developer
143
+ ```
144
+
145
+ Note: Any field that is supported by the Pivotal Tracker API should work within
146
+ reason (i.e. file uploads won't work). To get an idea of the fields available
147
+ see Pivotal Tracker's [Example CSV
148
+ data](https://www.pivotaltracker.com/help/articles/csv_import_export/#example-csv-data)
149
+ documentation.
150
+
151
+ ## Development
152
+
153
+ 1. [Fork](https://help.github.com/articles/fork-a-repo/) it
154
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
155
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
156
+ 4. Push to the branch (`git push origin my-new-feature`)
157
+ 5. Create new Pull Request
158
+
159
+ Please add tests at the same time as new features, and verify they all pass with:
160
+
161
+ ```
162
+ $ rake
163
+ ```
164
+
165
+ Credit - Wes Gibbs (https://github.com/wesgibbs) thought of and wrote Slurper as a
166
+ Ruby script. It was later packaged and released as a gem by his fellow
167
+ Rocketeers after using it and finding it extremely handy.
168
+
169
+ ---
170
+
171
+ ### About
172
+
173
+ [![Hashrocket logo](https://hashrocket.com/hashrocket_logo.svg)](https://hashrocket.com)
174
+
175
+ Slurper is supported by the team at [Hashrocket, a
176
+ multidisciplinary design and development consultancy](https://hashrocket.com). If you'd like to [work with
177
+ us](https://hashrocket.com/contact-us/hire-us) or [join our
178
+ team](https://hashrocket.com/contact-us/jobs), don't hesitate to get in touch.
@@ -22,11 +22,13 @@ module Slurper
22
22
  protected
23
23
 
24
24
  def yamlize_story_file
25
- IO.read(story_file).
26
- gsub(/^/, " ").
27
- gsub(/ ==.*/, "-").# !ruby/object:Slurper::Story\n attributes:").
28
- gsub(/ description:$/, " description: |")
25
+ IO.read(story_file)
26
+ .then {|x| x.strip}
27
+ .then {|x| x.gsub(/^ \b/, " ") }
28
+ .then {|x| x.gsub(/^/, " ") }
29
+ .then {|x| x.gsub(/ $/, "") }
30
+ .then {|x| x.gsub(/ ==.*/, "-") }
31
+ .then {|x| x.gsub(/ description:$/, " description: |") }
29
32
  end
30
-
31
33
  end
32
34
  end
metadata CHANGED
@@ -1,16 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slurper
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Lowe
8
8
  - Paul Elliott
9
9
  - Taylor Mock
10
+ - Chris Erin
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2014-05-08 00:00:00.000000000 Z
14
+ date: 2019-01-31 00:00:00.000000000 Z
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: activesupport
@@ -18,14 +19,14 @@ dependencies:
18
19
  requirements:
19
20
  - - "~>"
20
21
  - !ruby/object:Gem::Version
21
- version: '4.1'
22
+ version: '5.2'
22
23
  type: :runtime
23
24
  prerelease: false
24
25
  version_requirements: !ruby/object:Gem::Requirement
25
26
  requirements:
26
27
  - - "~>"
27
28
  - !ruby/object:Gem::Version
28
- version: '4.1'
29
+ version: '5.2'
29
30
  - !ruby/object:Gem::Dependency
30
31
  name: typhoeus
31
32
  requirement: !ruby/object:Gem::Requirement
@@ -48,11 +49,10 @@ email: dev@hashrocket.com
48
49
  executables:
49
50
  - slurp
50
51
  extensions: []
51
- extra_rdoc_files:
52
- - README.rdoc
52
+ extra_rdoc_files: []
53
53
  files:
54
54
  - MIT_LICENSE
55
- - README.rdoc
55
+ - README.md
56
56
  - Rakefile
57
57
  - bin/slurp
58
58
  - lib/slurper.rb
@@ -81,8 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  requirements: []
84
- rubyforge_project:
85
- rubygems_version: 2.2.2
84
+ rubygems_version: 3.0.2
86
85
  signing_key:
87
86
  specification_version: 4
88
87
  summary: takes a formatted story file and puts it on Pivotal Tracker
@@ -1,124 +0,0 @@
1
- = slurper gem
2
-
3
- Slurper allows you to quickly compose your stories in a text file and import them into Pivotal Tracker.
4
-
5
- Works great with slurper.vim! (http://github.com/adamlowe/vim-slurper)
6
-
7
- == Install
8
-
9
- $gem install slurper
10
-
11
- == Config
12
-
13
- Slurper requires a slurper_config.yml file in your working directory. This file contains your Tracker API and story requestor information.
14
-
15
- === Example
16
-
17
- project_id: 1234
18
- token: 123abc123abc123abc
19
- requested_by: Jane Stakeholder
20
-
21
- The project_id tells tracker which project to add your stories to. It can be found on the project settings or the url for the project.
22
-
23
- The token can be found on your personal profile page in Pivotal Tracker.
24
-
25
- The requested_by field should be the name of your project stakeholder exactly as it appears in tracker.
26
-
27
- == Usage
28
-
29
- Create a stories.slurper file and compose your stories in the slurper story format. In your working directory use the slurp command to import your stories from the stories.slurper file into Pivotal Tracker. Slurper looks for a stories.slurper file in your current directory by default, however, you can provide an alternate story source file if necessary.
30
-
31
- Default
32
-
33
- $slurp ~/stories.slurper
34
-
35
- Also valid
36
-
37
- $slurp ~/special_stories.slurper
38
-
39
- Or even
40
-
41
- $slurp ~/mystories.txt
42
-
43
- === Example stories.slurper
44
-
45
- ==
46
- story_type:
47
- chore
48
- name:
49
- Set Up Staging Environment
50
- description:
51
- Set up and configure staging environment for approval of stories
52
-
53
- labels:
54
- staging
55
- ==
56
- story_type:
57
- feature
58
- name:
59
- Campaign Manager Does Something
60
- description:
61
- In order to get some value
62
- As a campaign manager
63
- I want to do something
64
-
65
- - can do something
66
-
67
- labels:
68
- campaign managers
69
- ==
70
- story_type:
71
- release
72
- name:
73
- Big Release
74
- description:
75
- This release marks a lot of awesome functionality
76
-
77
- labels:
78
- campaign managers
79
- ==
80
- story_type:
81
- bug
82
- name:
83
- I did something and nothing happened
84
- description:
85
- When I do something, another thing is supposed to happen but I see an error screen instead.
86
-
87
- labels:
88
- campaign managers
89
-
90
- Note: the story source file is whitespace-sensitive. Be sure the value for each key phrase is indented with two spaces beneath each key phrase. Also, start each story with a double-equals on its own line.
91
-
92
- Your best bet is to leverage slurper.vim and benefit from its auto-indenting goodness.
93
-
94
- === Example advanced_stories.slurper
95
-
96
- There are some advanced techniques for formatting your stories beyond the simple type, name, description and label fields. See below for some examples.
97
-
98
- ==
99
- story_type:
100
- feature
101
- name:
102
- Make the cart accept coupons on checkout
103
- description:
104
- When I get to the checkout phase, I want the ability to add an optional coupon code. Use TESTCOUPON to test with.
105
- labels:
106
- cart,coupon system,checkout
107
- estimate:
108
- 3
109
- requested_by:
110
- Joe Developer
111
-
112
- Note: Any field that is supported by the Pivotal Tracker API should work within reason (i.e file uploads won't work). To get an idea of the fields available see this page (https://www.pivotaltracker.com/help/faq#canstoriesbeimportedfromcsv)
113
-
114
- == Note on Patches/Pull Requests
115
-
116
- * Fork the project.
117
- * Make your feature addition or bug fix.
118
- * Add tests for it. This is important so I don't break it in a
119
- future version unintentionally.
120
- * Commit, do not mess with rakefile, version, or history.
121
- (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
122
- * Send me a pull request.
123
-
124
- Credit - Wes Gibbs (http://wgibbs.github.com) thought of and wrote slurper as a ruby script. It was later packaged and released as a gem by his fellow Rocketeers after using it and finding it extremely handy.