peeky 0.0.15 → 0.0.19

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ca022f75a0c8100cb747acf3be51f77abf2ebedd092b6f235fbe717ea001dc4
4
- data.tar.gz: 43250493a0da5114f6d685445a8b189d335df8dc74f3596c3d7395b4e1dd0a3a
3
+ metadata.gz: 17aca44d1863e4d7d811c2fdf09bbe4aec22c8aa5a2d0d09983a8d9c50f14430
4
+ data.tar.gz: ff605fe00998f4e7ca15725f20171180329edd882256c46eaa20c96d41491488
5
5
  SHA512:
6
- metadata.gz: bbfa5087d3653aa6aee52ce37138883205e5b8ee1c3cef4419a0619c81e97f3f577c8f8482ff7c399d9a454fe07530857b8f16863129547f954cfcd45b7ddda9
7
- data.tar.gz: 71738fcef6e04171391b2863f480468f3e34ed249fcee9dfd6188fbf2fdfab0b655ebe07d82170e058dcadfef2b76e4c06bd22617b78d200608478cb35e06a95
6
+ metadata.gz: e212ec6b8cb3e88e78e57f42d7a880aabf73e46cabd0b23e8d3ce93a0819a74d36f7dbf1d1af95f2677824aa885e277d003445c4d8bc656afd4e1245f8cd8d04
7
+ data.tar.gz: 3498282a3c71032ef6866783d06f642b7c834079d3cfae164d577a734ba5194c082b820b956bef116f7277fed19993f7833776e3fe97c1401d1485cf976e176c
@@ -0,0 +1,31 @@
1
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
2
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
3
+
4
+ name: Ruby
5
+
6
+ on:
7
+ push:
8
+ branches: [ master ]
9
+ pull_request:
10
+ branches: [ master ]
11
+
12
+ jobs:
13
+ test:
14
+
15
+ runs-on: ubuntu-latest
16
+
17
+ steps:
18
+ - uses: actions/checkout@v2
19
+ - name: Set up Ruby
20
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
21
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
22
+ # uses: ruby/setup-ruby@v1
23
+ uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
24
+ with:
25
+ ruby-version: 2.6
26
+ - name: Install dependencies
27
+ run: bundle install
28
+ - name: Run tests
29
+ run: bundle exec rspec
30
+ - name: Run rubocop
31
+ run: bundle exec rubocop
data/Gemfile CHANGED
@@ -10,7 +10,7 @@ group :development, :test do
10
10
  gem 'guard-rspec'
11
11
  gem 'guard-rubocop'
12
12
  # pry on steroids
13
- gem 'pry-coolline', github: 'owst/pry-coolline', branch: 'support_new_pry_config_api'
13
+ # gem 'pry-coolline', github: 'owst/pry-coolline', branch: 'support_new_pry_config_api'
14
14
  gem 'jazz_fingers'
15
15
  gem 'rake', '~> 12.0'
16
16
  # this is used for cmdlets 'self-executing gems'
@@ -0,0 +1,55 @@
1
+ # Peeky
2
+
3
+ > Peeky is a Ruby GEM for peaking into ruby classes and extracting meta
4
+
5
+ As a Ruby Developer, I should be able to Reverse engineer classes and methods, so that I can document and understand them
6
+
7
+ ## Stories
8
+
9
+ As a Developer, I can render a class with instance attributes and methods, So that I can quickly mock out an entire class
10
+
11
+ - Render: Class Interface
12
+
13
+ As a Developer, I can render method signature with debug code, So that mock out a method with parameter logging
14
+
15
+ - Render: Method signature with debug code
16
+
17
+ As a Developer, I can see the method signature of a method, So that I understand it's parameters
18
+
19
+ - Render: Method Signature in compact format
20
+
21
+ As a Developer, I can render method with minimal parameter calls, So that I know the minimum parameters when calling a method
22
+
23
+ - Render: Simple instance method calls with minimum parameters
24
+
25
+ As a Developer, I can tell if a method is attr_*, so that I can format methods using attr_* notation
26
+
27
+ - Attr Writer Predicate will match true if the method info could be considered a valid attr_writer
28
+ - Attr Writer Predicate will match true if the method info could be considered a valid attr_writer
29
+
30
+ As a Developer, I should be able to interrogate class instance information, so that I can reverse engineer a ruby class
31
+
32
+ - ParameterInfo model to store information about parameters on a method
33
+ - MethodInfo model to store signature of a ruby instance method
34
+ - AttrInfo is a container that represents attr_reader, attr_writer or attr_accessor by storying 1 or 2 MethodInfo
35
+ - ClassInfo stores information about a ruby class. Only support instance methods
36
+
37
+
38
+ ## Tasks
39
+
40
+
41
+ Setup GitHub Action (test and lint)
42
+
43
+ - Setup Rspec action
44
+ - Setup RuboCop action
45
+
46
+
47
+ Setup new Ruby GEM
48
+
49
+ - Build out a standard GEM structure
50
+ - Add semantic versioning
51
+ - Add Rspec unit testing framework
52
+ - Add RuboCop linting
53
+ - Add Guard for automatic watch and test
54
+ - Add GitFlow support
55
+ - Add GitHub Repository
data/README.md CHANGED
@@ -1,30 +1,3 @@
1
- # ToDo
2
-
3
- * Manually create each file using the template system
4
- - Models
5
- - [Done] ParameterInfo
6
- - [Done] AttrInfo
7
- - [Done] ClassInfo
8
- - [Done] MethodInfo
9
- - Create predicates
10
- - [Done] attr_reader_predicate
11
- - [Done] attr_writer_predicate
12
- - Create renderers
13
- - [Done] method_call_minimum_params_render
14
- - [Done] method_signature_render
15
- - [Done] method_signature_with_debug_render
16
- - [Done] class_interface_render
17
- - [Done] Recreate peeky
18
- - [Done] Symlink KlueLess files
19
- - [Done] Hot fix after each section
20
- - [Done] Make sure the klueless files follow a natural structure
21
- - [Done] Push peeky to Ruby Gems
22
- - Build out the readme file
23
- - Build out the stories
24
- - Back compare templates vis definitions
25
- - Auto create .template folder with copied definitions
26
-
27
-
28
1
  # Peeky
29
2
 
30
3
  > Peeky is a Ruby GEM for peaking into ruby classes and extracting meta
@@ -57,6 +30,17 @@ gem install peeky
57
30
 
58
31
  ## Stories
59
32
 
33
+ ### Main Story
34
+
35
+ As a Ruby Developer, I should be able to Reverse engineer classes and methods, so that I can document and understand them
36
+
37
+ See all [stories](./README-stories.md)
38
+
39
+ ### Featured Stories
40
+
41
+ - As a Developer, I should be able to interrogate class instance information, so that I can reverse engineer a ruby class
42
+ - As a Developer, I can render method with minimal parameter calls, So that I know the minimum parameters when calling a method
43
+ - As a Developer, I can render a class with instance attributes and methods, So that I can quickly mock out an entire class
60
44
 
61
45
  ## Usage
62
46
 
@@ -3,7 +3,8 @@
3
3
  require 'forwardable'
4
4
 
5
5
  module Peeky
6
- # Method Info
6
+ # Method info store a list of instance methods and attr_* for
7
+ # a ruby class.
7
8
  class MethodInfo
8
9
  extend Forwardable
9
10
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Peeky
4
4
  module Renderer
5
- # Class Interface Render
5
+ # Render: Class Interface
6
6
  #
7
7
  # Example output:
8
8
  # class SampleClassClassInterfaceRender
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Peeky
4
- VERSION = '0.0.15'
4
+ VERSION = '0.0.19'
5
5
  end
@@ -12,10 +12,10 @@ Gem::Specification.new do |spec|
12
12
  spec.summary = 'Extracting meta data from ruby classes'
13
13
  spec.description = <<-TEXT
14
14
  Peeky is a Ruby GEM for peaking into ruby classes and extracting meta data.
15
- You can use this meta data to recreate classes, interfaces, documentation etc.
15
+ You can use this meta data to recreate classes, interfaces, documentation etc.
16
16
  or use it just to understand the internals of a class.
17
17
  TEXT
18
-
18
+
19
19
  spec.homepage = 'http://appydave.com/gems/peeky'
20
20
  spec.license = 'MIT'
21
21
 
@@ -39,6 +39,7 @@ Gem::Specification.new do |spec|
39
39
  spec.bindir = 'exe'
40
40
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
41
41
  spec.require_paths = ['lib']
42
+ # spec.extensions = ['ext/peeky/extconf.rb']
42
43
 
43
44
  # spec.add_dependency 'tty-box', '~> 0.5.0'
44
45
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peeky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - David C
@@ -10,15 +10,17 @@ bindir: exe
10
10
  cert_chain: []
11
11
  date: 2020-11-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: " Peeky is a Ruby GEM for peaking into ruby classes and extracting meta
14
- data.\n You can use this meta data to recreate classes, interfaces, documentation
15
- etc. \n or use it just to understand the internals of a class.\n"
13
+ description: |2
14
+ Peeky is a Ruby GEM for peaking into ruby classes and extracting meta data.
15
+ You can use this meta data to recreate classes, interfaces, documentation etc.
16
+ or use it just to understand the internals of a class.
16
17
  email:
17
18
  - david@ideasmen.com.au
18
19
  executables: []
19
20
  extensions: []
20
21
  extra_rdoc_files: []
21
22
  files:
23
+ - ".github/workflows/ruby.yml"
22
24
  - ".gitignore"
23
25
  - ".rspec"
24
26
  - ".rubocop.yml"
@@ -27,6 +29,7 @@ files:
27
29
  - Gemfile
28
30
  - Guardfile
29
31
  - LICENSE.txt
32
+ - README-stories.md
30
33
  - README.md
31
34
  - Rakefile
32
35
  - bin/console