cute_print 1.1.4 → 1.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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/Gemfile +1 -17
  4. data/README.md +3 -3
  5. data/cute_print.gemspec +63 -77
  6. data/lib/cute_print/release.rb +13 -0
  7. metadata +98 -62
  8. data/.config/cucumber.yml +0 -1
  9. data/.rspec +0 -1
  10. data/.travis.yml +0 -6
  11. data/.yardopts +0 -7
  12. data/Gemfile.lock +0 -110
  13. data/VERSION +0 -1
  14. data/features/.nav +0 -10
  15. data/features/call_chain.feature +0 -96
  16. data/features/configuring/configure_output.feature +0 -21
  17. data/features/configuring/configure_position_format.feature +0 -39
  18. data/features/configuring/readme.md +0 -1
  19. data/features/configuring/reset_configuration.feature +0 -24
  20. data/features/inspect/core.feature +0 -18
  21. data/features/inspect/inspect.feature +0 -29
  22. data/features/inspect/inspect_with_location.feature +0 -54
  23. data/features/inspect/inspect_with_source.feature +0 -16
  24. data/features/inspect/readme.md +0 -1
  25. data/features/pretty_print/pretty_print.feature +0 -41
  26. data/features/pretty_print/pretty_print_with_location.feature +0 -73
  27. data/features/pretty_print/pretty_print_with_source.feature +0 -27
  28. data/features/readme.md +0 -1
  29. data/features/support/env.rb +0 -9
  30. data/features/support/helpers/example.rb +0 -52
  31. data/features/support/helpers/example_runner.rb +0 -24
  32. data/features/support/helpers/fork_example_runner.rb +0 -37
  33. data/features/support/helpers/lib_path.rb +0 -7
  34. data/features/support/helpers/shell_example_runner.rb +0 -26
  35. data/features/support/helpers/temp_dir.rb +0 -15
  36. data/features/support/step_definitions.rb +0 -49
  37. data/spec/cute_print_spec.rb +0 -54
  38. data/spec/format/inspect_spec.rb +0 -20
  39. data/spec/format/pretty_print_spec.rb +0 -36
  40. data/spec/inline_labeler_spec.rb +0 -39
  41. data/spec/irb_spec.rb +0 -25
  42. data/spec/labeler_spec.rb +0 -97
  43. data/spec/outline_labeler_spec.rb +0 -37
  44. data/spec/printer_spec.rb +0 -79
  45. data/spec/silence_warnings.rb +0 -24
  46. data/spec/spec_helper.rb +0 -21
  47. data/spec/support/captures_stderr.rb +0 -3
  48. data/tasks/cucumber.rake +0 -8
  49. data/tasks/default.rake +0 -1
  50. data/tasks/jeweler.rake +0 -39
  51. data/tasks/spec.rake +0 -5
  52. data/tasks/test.rake +0 -2
  53. data/tasks/yard.rake +0 -3
  54. data/test_support/captures_stderr.rb +0 -16
  55. data/test_support/captures_stdout.rb +0 -16
  56. data/test_support/thread_unsafe_string_io.rb +0 -13
data/.config/cucumber.yml DELETED
@@ -1 +0,0 @@
1
- default: --require features/support/env.rb
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --color
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 1.9.3
4
- - 2.0
5
- - 2.1
6
- - 2.2
data/.yardopts DELETED
@@ -1,7 +0,0 @@
1
- --exclude '[~#]$'
2
- --markup markdown
3
- --readme README.md
4
- lib/**/*.rb
5
- -
6
- LICENSE
7
- CHANGELOG.md
data/Gemfile.lock DELETED
@@ -1,110 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- addressable (2.4.0)
5
- builder (3.2.2)
6
- cucumber (2.4.0)
7
- builder (>= 2.1.2)
8
- cucumber-core (~> 1.5.0)
9
- cucumber-wire (~> 0.0.1)
10
- diff-lcs (>= 1.1.3)
11
- gherkin (~> 4.0)
12
- multi_json (>= 1.7.5, < 2.0)
13
- multi_test (>= 0.1.2)
14
- cucumber-core (1.5.0)
15
- gherkin (~> 4.0)
16
- cucumber-wire (0.0.1)
17
- descendants_tracker (0.0.4)
18
- thread_safe (~> 0.3, >= 0.3.1)
19
- diff-lcs (1.2.5)
20
- faraday (0.9.2)
21
- multipart-post (>= 1.2, < 3)
22
- gherkin (4.0.0)
23
- git (1.3.0)
24
- github_api (0.14.0)
25
- addressable (~> 2.4.0)
26
- descendants_tracker (~> 0.0.4)
27
- faraday (~> 0.8, < 0.10)
28
- hashie (>= 3.4)
29
- oauth2
30
- given_core (3.8.0)
31
- sorcerer (>= 0.3.7)
32
- hashie (3.4.4)
33
- highline (1.7.8)
34
- hirb (0.7.3)
35
- jeweler (2.1.1)
36
- builder
37
- bundler (>= 1.0)
38
- git (>= 1.2.5)
39
- github_api
40
- highline (>= 1.6.15)
41
- nokogiri (>= 1.5.10)
42
- rake
43
- rdoc
44
- semver
45
- json (1.8.3)
46
- jwt (1.5.1)
47
- mini_portile2 (2.1.0)
48
- multi_json (1.12.1)
49
- multi_test (0.1.2)
50
- multi_xml (0.5.5)
51
- multipart-post (2.0.0)
52
- nokogiri (1.6.8)
53
- mini_portile2 (~> 2.1.0)
54
- pkg-config (~> 1.1.7)
55
- oauth2 (1.1.0)
56
- faraday (>= 0.8, < 0.10)
57
- jwt (~> 1.0, < 1.5.2)
58
- multi_json (~> 1.3)
59
- multi_xml (~> 0.5)
60
- rack (>= 1.2, < 3)
61
- pkg-config (1.1.7)
62
- rack (1.6.4)
63
- rake (11.2.2)
64
- rdoc (4.2.2)
65
- json (~> 1.4)
66
- redcarpet (3.3.4)
67
- rspec (3.4.0)
68
- rspec-core (~> 3.4.0)
69
- rspec-expectations (~> 3.4.0)
70
- rspec-mocks (~> 3.4.0)
71
- rspec-core (3.4.4)
72
- rspec-support (~> 3.4.0)
73
- rspec-expectations (3.4.0)
74
- diff-lcs (>= 1.2.0, < 2.0)
75
- rspec-support (~> 3.4.0)
76
- rspec-given (3.8.0)
77
- given_core (= 3.8.0)
78
- rspec (>= 2.14.0)
79
- rspec-mocks (3.4.1)
80
- diff-lcs (>= 1.2.0, < 2.0)
81
- rspec-support (~> 3.4.0)
82
- rspec-support (3.4.1)
83
- ruby2ruby (2.3.0)
84
- ruby_parser (~> 3.1)
85
- sexp_processor (~> 4.0)
86
- ruby_parser (3.8.2)
87
- sexp_processor (~> 4.1)
88
- semver (1.0.1)
89
- sexp_processor (4.7.0)
90
- sorcerer (1.0.2)
91
- thread_safe (0.3.5)
92
- yard (0.8.7.6)
93
-
94
- PLATFORMS
95
- ruby
96
-
97
- DEPENDENCIES
98
- cucumber (~> 2.0)
99
- hirb (~> 0.7)
100
- jeweler (~> 2.0)
101
- rake (~> 11.2)
102
- redcarpet (~> 3.2)
103
- rspec (~> 3.1)
104
- rspec-given (~> 3.5)
105
- ruby2ruby (~> 2.1)
106
- ruby_parser (~> 3.6)
107
- yard (~> 0.8.7)
108
-
109
- BUNDLED WITH
110
- 1.11.2
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 1.1.4
data/features/.nav DELETED
@@ -1,10 +0,0 @@
1
- - inspect:
2
- - inspect.feature
3
- - inspect_with_source.feature
4
- - inspect_with_location.feature
5
- - pretty_print:
6
- - pretty_print.feature
7
- - pretty_print_with_source.feature
8
- - pretty_print_with_location.feature
9
- - call_chain.feature
10
- - configuring:
@@ -1,96 +0,0 @@
1
- Feature: Inspect a call chain
2
-
3
- Call chains (aka "train wrecks") can be a bother to debug.
4
- Kernel#tapq prints a value in a call chain and then continues the
5
- chain.
6
-
7
- Scenario: Without source position
8
- Given a file with:
9
- """
10
- require "cute_print"
11
- puts ["1", "2"].map(&:to_i).tapq.inject(:+)
12
- """
13
- Then stdout should be
14
- """
15
- 3
16
-
17
- """
18
- And stderr should be
19
- """
20
- [1, 2]
21
-
22
- """
23
-
24
- Scenario: With source position
25
- Given a file named "example.rb" with:
26
- """
27
- require "cute_print"
28
- puts ["1", "2"].map(&:to_i).tapql.inject(:+)
29
- """
30
- Then stdout should be
31
- """
32
- 3
33
-
34
- """
35
- And stderr should be
36
- """
37
- example.rb:2: [1, 2]
38
-
39
- """
40
-
41
- Scenario: Pretty print
42
- Given a file with:
43
- """
44
- require "cute_print"
45
- a = [
46
- "Once upon a time there were four little Rabbits, and their names were",
47
- "Flopsy,",
48
- "Mopsy,",
49
- "Cotton-tail, and",
50
- "Peter.",
51
- ]
52
- puts a.tapqq.map(&:size).inject(&:+)
53
- """
54
- Then stdout should be
55
- """
56
- 104
57
-
58
- """
59
- And stderr should be
60
- """
61
- ["Once upon a time there were four little Rabbits, and their names were",
62
- "Flopsy,",
63
- "Mopsy,",
64
- "Cotton-tail, and",
65
- "Peter."]
66
-
67
- """
68
-
69
- Scenario: Pretty print with source location
70
- Given a file with:
71
- """
72
- require "cute_print"
73
- a = [
74
- "Once upon a time there were four little Rabbits, and their names were",
75
- "Flopsy,",
76
- "Mopsy,",
77
- "Cotton-tail, and",
78
- "Peter.",
79
- ]
80
- puts a.tapqql.map(&:size).inject(&:+)
81
- """
82
- Then stdout should be
83
- """
84
- 104
85
-
86
- """
87
- And stderr should be
88
- """
89
- example.rb:9:
90
- ["Once upon a time there were four little Rabbits, and their names were",
91
- "Flopsy,",
92
- "Mopsy,",
93
- "Cotton-tail, and",
94
- "Peter."]
95
-
96
- """
@@ -1,21 +0,0 @@
1
- Feature: Configure output
2
-
3
- By default, output is written to $stderr. You can change where
4
- output goes.
5
-
6
- Scenario: Write to $stdout
7
- Given a file with:
8
- """
9
- require "cute_print"
10
-
11
- CutePrint.configure do |c|
12
- c.out = $stdout
13
- end
14
-
15
- q "abc"
16
- """
17
- Then stdout should be
18
- """
19
- "abc"
20
-
21
- """
@@ -1,39 +0,0 @@
1
- Feature: Configure location format
2
-
3
- You can change the format which Kernel#ql uses to print the source
4
- location. By default, just the filename is printed, but you can
5
- cause the full path. to be printed instead.
6
-
7
- Scenario: Write full path
8
- Given a file named "example.rb" with:
9
- """
10
- require "cute_print"
11
-
12
- CutePrint.configure do |c|
13
- c.location_format = :path
14
- end
15
-
16
- ql 123
17
- """
18
- Then stderr should be
19
- """
20
- /tmp/.../example.rb:7: 123
21
-
22
- """
23
-
24
- Scenario: Write filename
25
- Given a file named "example.rb" with:
26
- """
27
- require "cute_print"
28
-
29
- CutePrint.configure do |c|
30
- c.location_format = :filename
31
- end
32
-
33
- ql 123
34
- """
35
- Then stderr should be
36
- """
37
- example.rb:7: 123
38
-
39
- """
@@ -1 +0,0 @@
1
- You can configure several things:
@@ -1,24 +0,0 @@
1
- Feature: Reset configuration
2
-
3
- You can reset the configuration to its defaults.
4
-
5
- Scenario: Write to $stdout
6
- Given a file with:
7
- """
8
- require "cute_print"
9
-
10
- CutePrint.configure { |c| c.out = $stdout }
11
- q "abc"
12
- CutePrint.configure { |c| c.reset }
13
- q 123
14
- """
15
- Then stdout should be
16
- """
17
- "abc"
18
-
19
- """
20
- And stderr should be
21
- """
22
- 123
23
-
24
- """
@@ -1,18 +0,0 @@
1
- Feature: Core functionality
2
-
3
- cute_print, by default, adds a fair number of methods to Object,
4
- making them available globally. You can use cute_print without any
5
- changes to Object, by requiring "cute_print/core" instead of
6
- "cute_print".
7
-
8
- Scenario: Inspect an object
9
- Given a file with:
10
- """
11
- require "cute_print/core"
12
- CutePrint.q "abc"
13
- """
14
- Then stderr should be
15
- """
16
- "abc"
17
-
18
- """
@@ -1,29 +0,0 @@
1
- Feature: Inspect
2
-
3
- Kernel#q inspects its arguments and prints them, one per line. This
4
- is just like Kernel#p, except that it writes to $stderr by default.
5
-
6
- Scenario: One argument
7
- Given a file with:
8
- """
9
- require "cute_print"
10
- q "abc"
11
- """
12
- Then stderr should be
13
- """
14
- "abc"
15
-
16
- """
17
-
18
- Scenario: Two arguments
19
- Given a file with:
20
- """
21
- require "cute_print"
22
- q "abc", 123
23
- """
24
- Then stderr should be
25
- """
26
- "abc"
27
- 123
28
-
29
- """
@@ -1,54 +0,0 @@
1
- Feature: Inspect with source location
2
-
3
- Kernel#ql works just like Kernel#pp from the built-in pp library,
4
- except that it writes to $stderr, _and_ it prints the source
5
- location.
6
-
7
- Scenario: Inspect an object
8
- Given a file named "example.rb" with:
9
- """
10
- require "cute_print"
11
- ql "abc"
12
- """
13
- Then stderr should be
14
- """
15
- example.rb:2: "abc"
16
-
17
- """
18
-
19
- Scenario: Inspect two objects
20
- Given a file named "example.rb" with:
21
- """
22
- require "cute_print"
23
- ql "abc", 123
24
- """
25
- Then stderr should be
26
- """
27
- example.rb:2: "abc"
28
- example.rb:2: 123
29
-
30
- """
31
-
32
- Scenario: Inspect with source
33
- Given a file named "example.rb" with:
34
- """
35
- require "cute_print"
36
- ql {1 + 2}
37
- """
38
- Then stderr should be
39
- """
40
- example.rb:2: (1 + 2) is 3
41
-
42
- """
43
-
44
- Scenario: Just print the location
45
- Given a file named "example.rb" with:
46
- """
47
- require "cute_print"
48
- ql
49
- """
50
- Then stderr should be
51
- """
52
- example.rb:2
53
-
54
- """