appmap 0.39.0 → 0.39.1
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 +4 -4
- data/.travis.yml +2 -16
- data/CHANGELOG.md +5 -2
- data/README.md +8 -1
- data/Rakefile +3 -3
- data/lib/appmap/hook.rb +11 -3
- data/lib/appmap/version.rb +1 -1
- data/spec/hook_spec.rb +4 -40
- metadata +2 -68
- data/spec/abstract_controller4_base_spec.rb +0 -66
- data/spec/fixtures/rails4_users_app/.gitignore +0 -13
- data/spec/fixtures/rails4_users_app/.rbenv-gemsets +0 -2
- data/spec/fixtures/rails4_users_app/.ruby-version +0 -1
- data/spec/fixtures/rails4_users_app/Dockerfile +0 -30
- data/spec/fixtures/rails4_users_app/Dockerfile.pg +0 -3
- data/spec/fixtures/rails4_users_app/Gemfile +0 -77
- data/spec/fixtures/rails4_users_app/README.rdoc +0 -28
- data/spec/fixtures/rails4_users_app/Rakefile +0 -6
- data/spec/fixtures/rails4_users_app/app/assets/images/.keep +0 -0
- data/spec/fixtures/rails4_users_app/app/assets/javascripts/application.js +0 -16
- data/spec/fixtures/rails4_users_app/app/assets/stylesheets/application.css +0 -15
- data/spec/fixtures/rails4_users_app/app/controllers/api/users_controller.rb +0 -27
- data/spec/fixtures/rails4_users_app/app/controllers/application_controller.rb +0 -5
- data/spec/fixtures/rails4_users_app/app/controllers/concerns/.keep +0 -0
- data/spec/fixtures/rails4_users_app/app/controllers/health_controller.rb +0 -5
- data/spec/fixtures/rails4_users_app/app/controllers/users_controller.rb +0 -5
- data/spec/fixtures/rails4_users_app/app/helpers/application_helper.rb +0 -2
- data/spec/fixtures/rails4_users_app/app/mailers/.keep +0 -0
- data/spec/fixtures/rails4_users_app/app/models/.keep +0 -0
- data/spec/fixtures/rails4_users_app/app/models/concerns/.keep +0 -0
- data/spec/fixtures/rails4_users_app/app/models/user.rb +0 -18
- data/spec/fixtures/rails4_users_app/app/views/layouts/application.html.haml +0 -7
- data/spec/fixtures/rails4_users_app/app/views/users/index.html.haml +0 -7
- data/spec/fixtures/rails4_users_app/appmap.yml +0 -3
- data/spec/fixtures/rails4_users_app/bin/rails +0 -9
- data/spec/fixtures/rails4_users_app/bin/setup +0 -29
- data/spec/fixtures/rails4_users_app/bin/spring +0 -17
- data/spec/fixtures/rails4_users_app/config.ru +0 -4
- data/spec/fixtures/rails4_users_app/config/application.rb +0 -26
- data/spec/fixtures/rails4_users_app/config/boot.rb +0 -3
- data/spec/fixtures/rails4_users_app/config/database.yml +0 -18
- data/spec/fixtures/rails4_users_app/config/environment.rb +0 -5
- data/spec/fixtures/rails4_users_app/config/environments/development.rb +0 -41
- data/spec/fixtures/rails4_users_app/config/environments/production.rb +0 -79
- data/spec/fixtures/rails4_users_app/config/environments/test.rb +0 -42
- data/spec/fixtures/rails4_users_app/config/initializers/assets.rb +0 -11
- data/spec/fixtures/rails4_users_app/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/fixtures/rails4_users_app/config/initializers/cookies_serializer.rb +0 -3
- data/spec/fixtures/rails4_users_app/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/fixtures/rails4_users_app/config/initializers/inflections.rb +0 -16
- data/spec/fixtures/rails4_users_app/config/initializers/mime_types.rb +0 -4
- data/spec/fixtures/rails4_users_app/config/initializers/session_store.rb +0 -3
- data/spec/fixtures/rails4_users_app/config/initializers/to_time_preserves_timezone.rb +0 -10
- data/spec/fixtures/rails4_users_app/config/initializers/wrap_parameters.rb +0 -14
- data/spec/fixtures/rails4_users_app/config/locales/en.yml +0 -23
- data/spec/fixtures/rails4_users_app/config/routes.rb +0 -12
- data/spec/fixtures/rails4_users_app/config/secrets.yml +0 -22
- data/spec/fixtures/rails4_users_app/create_app +0 -23
- data/spec/fixtures/rails4_users_app/db/migrate/20191127112304_create_users.rb +0 -10
- data/spec/fixtures/rails4_users_app/db/schema.rb +0 -26
- data/spec/fixtures/rails4_users_app/db/seeds.rb +0 -7
- data/spec/fixtures/rails4_users_app/docker-compose.yml +0 -26
- data/spec/fixtures/rails4_users_app/lib/assets/.keep +0 -0
- data/spec/fixtures/rails4_users_app/lib/tasks/.keep +0 -0
- data/spec/fixtures/rails4_users_app/log/.keep +0 -0
- data/spec/fixtures/rails4_users_app/public/404.html +0 -67
- data/spec/fixtures/rails4_users_app/public/422.html +0 -67
- data/spec/fixtures/rails4_users_app/public/500.html +0 -66
- data/spec/fixtures/rails4_users_app/public/favicon.ico +0 -0
- data/spec/fixtures/rails4_users_app/public/robots.txt +0 -5
- data/spec/fixtures/rails4_users_app/spec/controllers/users_controller_api_spec.rb +0 -49
- data/spec/fixtures/rails4_users_app/spec/rails_helper.rb +0 -95
- data/spec/fixtures/rails4_users_app/spec/spec_helper.rb +0 -96
- data/spec/fixtures/rails4_users_app/test/fixtures/users.yml +0 -9
- data/spec/record_sql_rails4_pg_spec.rb +0 -75
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 384456ad51727b3c819e8307de92b2785da152a46c5fa60d0a4e6ff690dbb596
|
|
4
|
+
data.tar.gz: e0d5a984bc74ee91b0f9428d83cbaac70c387b442cc55666f36b75907080e620
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2f0670d632a370241168ad76ad30dd663568556ea3e524c48aafdbf86ae9d0c8e8f76f48a1c34a7a830457cff66c4417bbf19acb7ac952daeaaec65121e7a0d5
|
|
7
|
+
data.tar.gz: 3f1bec26161a40c75487e7f98f039df0c135f7de77ee089d72dde29c1a5d5fd19b43661c6aff3c3de58e945b87d330b96a66738a95a208ec7a4e75db1bd85363
|
data/.travis.yml
CHANGED
|
@@ -16,22 +16,8 @@ before_script:
|
|
|
16
16
|
|
|
17
17
|
jobs:
|
|
18
18
|
include:
|
|
19
|
-
- stage:
|
|
19
|
+
- stage: test
|
|
20
20
|
script:
|
|
21
21
|
- mkdir tmp
|
|
22
|
-
- bundle exec rake
|
|
23
|
-
|
|
24
|
-
- stage: base
|
|
25
|
-
script:
|
|
26
|
-
- bundle exec rake build:base:2.5
|
|
27
|
-
- stage: base
|
|
28
|
-
script:
|
|
29
|
-
- bundle exec rake build:base:2.6
|
|
30
|
-
|
|
31
|
-
- stage: spec
|
|
32
|
-
script:
|
|
33
|
-
- bundle exec rake spec:2.5
|
|
34
|
-
- stage: spec
|
|
35
|
-
script:
|
|
36
|
-
- bundle exec rake spec:2.6
|
|
22
|
+
- bundle exec rake test
|
|
37
23
|
|
data/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
# v0.39.
|
|
1
|
+
# v0.39.1
|
|
2
|
+
* Support Ruby 2.7.
|
|
3
|
+
* Remove support for Rails 4.
|
|
4
|
+
* Stop recommending `-t appmap` argument for `rspec`.
|
|
2
5
|
|
|
6
|
+
# v0.39.0
|
|
3
7
|
* Recognize and record `normalized_path_info` in Rails applications, per 1.4 AppMap format version.
|
|
4
8
|
|
|
5
9
|
# v0.38.1
|
|
6
|
-
|
|
7
10
|
* Package configuration can be `shallow`, in case which only the initial entry into the package is recorded.
|
|
8
11
|
|
|
9
12
|
# v0.37.2
|
data/README.md
CHANGED
|
@@ -39,6 +39,13 @@ by the [AppLand CLI](https://github.com/applandinc/appland-cli/releases).
|
|
|
39
39
|
Then, on the [AppLand website](https://app.land), you can
|
|
40
40
|
visualize the design of your code and share links with collaborators.
|
|
41
41
|
|
|
42
|
+
### Supported versions
|
|
43
|
+
|
|
44
|
+
* Ruby 2.5, 2.6, 2.7
|
|
45
|
+
* Rails 5, 6
|
|
46
|
+
|
|
47
|
+
Support for new versions is added frequently, please check back regularly for updates.
|
|
48
|
+
|
|
42
49
|
# Installation
|
|
43
50
|
|
|
44
51
|
Add `gem 'appmap'` to your Gemfile just as you would any other dependency.
|
|
@@ -128,7 +135,7 @@ require File.expand_path("../../config/environment", __FILE__)
|
|
|
128
135
|
3) Run the tests with the environment variable `APPMAP=true`:
|
|
129
136
|
|
|
130
137
|
```sh-session
|
|
131
|
-
$ APPMAP=true bundle exec rspec
|
|
138
|
+
$ APPMAP=true bundle exec rspec
|
|
132
139
|
```
|
|
133
140
|
|
|
134
141
|
Each RSpec test will output an AppMap file into the directory `tmp/appmap/rspec`. For example:
|
data/Rakefile
CHANGED
|
@@ -18,12 +18,12 @@ namespace 'gem' do
|
|
|
18
18
|
require 'bundler/gem_tasks'
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
RUBY_VERSIONS=%w[2.5 2.6]
|
|
22
|
-
FIXTURE_APPS=%w[rack_users_app rails6_users_app rails5_users_app
|
|
21
|
+
RUBY_VERSIONS=%w[2.5 2.6 2.7]
|
|
22
|
+
FIXTURE_APPS=%w[rack_users_app rails6_users_app rails5_users_app]
|
|
23
23
|
|
|
24
24
|
def run_cmd(*cmd)
|
|
25
25
|
$stderr.puts "Running: #{cmd}"
|
|
26
|
-
out,s = Open3.capture2e(*cmd)
|
|
26
|
+
out, s = Open3.capture2e(*cmd)
|
|
27
27
|
unless s.success?
|
|
28
28
|
$stderr.puts <<-END
|
|
29
29
|
Command failed:
|
data/lib/appmap/hook.rb
CHANGED
|
@@ -6,6 +6,9 @@ module AppMap
|
|
|
6
6
|
class Hook
|
|
7
7
|
LOG = (ENV['APPMAP_DEBUG'] == 'true' || ENV['DEBUG'] == 'true')
|
|
8
8
|
|
|
9
|
+
OBJECT_INSTANCE_METHODS = %i[! != !~ <=> == === =~ __id__ __send__ class clone define_singleton_method display dup enum_for eql? equal? extend freeze frozen? hash inspect instance_eval instance_exec instance_of? instance_variable_defined? instance_variable_get instance_variable_set instance_variables is_a? itself kind_of? method methods nil? object_id private_methods protected_methods public_method public_methods public_send remove_instance_variable respond_to? send singleton_class singleton_method singleton_methods taint tainted? tap then to_enum to_s to_h to_a trust untaint untrust untrusted? yield_self].freeze
|
|
10
|
+
OBJECT_STATIC_METHODS = %i[! != !~ < <= <=> == === =~ > >= __id__ __send__ alias_method allocate ancestors attr attr_accessor attr_reader attr_writer autoload autoload? class class_eval class_exec class_variable_defined? class_variable_get class_variable_set class_variables clone const_defined? const_get const_missing const_set constants define_method define_singleton_method deprecate_constant display dup enum_for eql? equal? extend freeze frozen? hash include include? included_modules inspect instance_eval instance_exec instance_method instance_methods instance_of? instance_variable_defined? instance_variable_get instance_variable_set instance_variables is_a? itself kind_of? method method_defined? methods module_eval module_exec name new nil? object_id prepend private_class_method private_constant private_instance_methods private_method_defined? private_methods protected_instance_methods protected_method_defined? protected_methods public_class_method public_constant public_instance_method public_instance_methods public_method public_method_defined? public_methods public_send remove_class_variable remove_instance_variable remove_method respond_to? send singleton_class singleton_class? singleton_method singleton_methods superclass taint tainted? tap then to_enum to_s trust undef_method untaint untrust untrusted? yield_self].freeze
|
|
11
|
+
|
|
9
12
|
@unbound_method_arity = ::UnboundMethod.instance_method(:arity)
|
|
10
13
|
@method_arity = ::Method.instance_method(:arity)
|
|
11
14
|
|
|
@@ -42,12 +45,17 @@ module AppMap
|
|
|
42
45
|
tp = TracePoint.new(:end) do |trace_point|
|
|
43
46
|
cls = trace_point.self
|
|
44
47
|
|
|
45
|
-
instance_methods = cls.public_instance_methods(false)
|
|
46
|
-
class_methods = cls.singleton_class.public_instance_methods(false) - instance_methods
|
|
48
|
+
instance_methods = cls.public_instance_methods(false) - OBJECT_INSTANCE_METHODS
|
|
49
|
+
class_methods = cls.singleton_class.public_instance_methods(false) - instance_methods - OBJECT_STATIC_METHODS
|
|
47
50
|
|
|
48
51
|
hook = lambda do |hook_cls|
|
|
49
52
|
lambda do |method_id|
|
|
50
|
-
method =
|
|
53
|
+
method = begin
|
|
54
|
+
hook_cls.public_instance_method(method_id)
|
|
55
|
+
rescue NameError
|
|
56
|
+
warn "AppMap: Method #{hook_cls} #{method.name} is not accessible" if LOG
|
|
57
|
+
return
|
|
58
|
+
end
|
|
51
59
|
|
|
52
60
|
warn "AppMap: Examining #{hook_cls} #{method.name}" if LOG
|
|
53
61
|
|
data/lib/appmap/version.rb
CHANGED
data/spec/hook_spec.rb
CHANGED
|
@@ -517,24 +517,6 @@ describe 'AppMap class Hooking', docker: false do
|
|
|
517
517
|
events_yaml = <<~YAML
|
|
518
518
|
---
|
|
519
519
|
- :id: 1
|
|
520
|
-
:event: :call
|
|
521
|
-
:defined_class: NoToSMethod
|
|
522
|
-
:method_id: respond_to?
|
|
523
|
-
:path: spec/fixtures/hook/exception_method.rb
|
|
524
|
-
:lineno: 24
|
|
525
|
-
:static: false
|
|
526
|
-
:parameters:
|
|
527
|
-
- :name: :args
|
|
528
|
-
:class: Array
|
|
529
|
-
:value: "[:to_s]"
|
|
530
|
-
:kind: :rest
|
|
531
|
-
:receiver:
|
|
532
|
-
:class: Class
|
|
533
|
-
:value: NoToSMethod
|
|
534
|
-
- :id: 2
|
|
535
|
-
:event: :return
|
|
536
|
-
:parent_id: 1
|
|
537
|
-
- :id: 3
|
|
538
520
|
:event: :call
|
|
539
521
|
:defined_class: NoToSMethod
|
|
540
522
|
:method_id: say_hello
|
|
@@ -545,9 +527,9 @@ describe 'AppMap class Hooking', docker: false do
|
|
|
545
527
|
:receiver:
|
|
546
528
|
:class: Class
|
|
547
529
|
:value: NoToSMethod
|
|
548
|
-
- :id:
|
|
530
|
+
- :id: 2
|
|
549
531
|
:event: :return
|
|
550
|
-
:parent_id:
|
|
532
|
+
:parent_id: 1
|
|
551
533
|
:return_value:
|
|
552
534
|
:class: String
|
|
553
535
|
:value: hello
|
|
@@ -565,24 +547,6 @@ describe 'AppMap class Hooking', docker: false do
|
|
|
565
547
|
events_yaml = <<~YAML
|
|
566
548
|
---
|
|
567
549
|
- :id: 1
|
|
568
|
-
:event: :call
|
|
569
|
-
:defined_class: NoToSMethod
|
|
570
|
-
:method_id: respond_to?
|
|
571
|
-
:path: spec/fixtures/hook/exception_method.rb
|
|
572
|
-
:lineno: 24
|
|
573
|
-
:static: false
|
|
574
|
-
:parameters:
|
|
575
|
-
- :name: :args
|
|
576
|
-
:class: Array
|
|
577
|
-
:value: "[:to_s]"
|
|
578
|
-
:kind: :rest
|
|
579
|
-
:receiver:
|
|
580
|
-
:class: Class
|
|
581
|
-
:value: "*Error inspecting variable*"
|
|
582
|
-
- :id: 2
|
|
583
|
-
:event: :return
|
|
584
|
-
:parent_id: 1
|
|
585
|
-
- :id: 3
|
|
586
550
|
:event: :call
|
|
587
551
|
:defined_class: InspectRaises
|
|
588
552
|
:method_id: say_hello
|
|
@@ -593,9 +557,9 @@ describe 'AppMap class Hooking', docker: false do
|
|
|
593
557
|
:receiver:
|
|
594
558
|
:class: Class
|
|
595
559
|
:value: "*Error inspecting variable*"
|
|
596
|
-
- :id:
|
|
560
|
+
- :id: 2
|
|
597
561
|
:event: :return
|
|
598
|
-
:parent_id:
|
|
562
|
+
:parent_id: 1
|
|
599
563
|
:return_value:
|
|
600
564
|
:class: String
|
|
601
565
|
:value: hello
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: appmap
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.39.
|
|
4
|
+
version: 0.39.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kevin Gilpin
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-01-
|
|
11
|
+
date: 2021-01-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -378,7 +378,6 @@ files:
|
|
|
378
378
|
- lore/public/stylesheets/style.css
|
|
379
379
|
- package-lock.json
|
|
380
380
|
- package.json
|
|
381
|
-
- spec/abstract_controller4_base_spec.rb
|
|
382
381
|
- spec/abstract_controller_base_spec.rb
|
|
383
382
|
- spec/class_map_spec.rb
|
|
384
383
|
- spec/config_spec.rb
|
|
@@ -396,70 +395,6 @@ files:
|
|
|
396
395
|
- spec/fixtures/rack_users_app/config.ru
|
|
397
396
|
- spec/fixtures/rack_users_app/docker-compose.yml
|
|
398
397
|
- spec/fixtures/rack_users_app/lib/app.rb
|
|
399
|
-
- spec/fixtures/rails4_users_app/.gitignore
|
|
400
|
-
- spec/fixtures/rails4_users_app/.rbenv-gemsets
|
|
401
|
-
- spec/fixtures/rails4_users_app/.ruby-version
|
|
402
|
-
- spec/fixtures/rails4_users_app/Dockerfile
|
|
403
|
-
- spec/fixtures/rails4_users_app/Dockerfile.pg
|
|
404
|
-
- spec/fixtures/rails4_users_app/Gemfile
|
|
405
|
-
- spec/fixtures/rails4_users_app/README.rdoc
|
|
406
|
-
- spec/fixtures/rails4_users_app/Rakefile
|
|
407
|
-
- spec/fixtures/rails4_users_app/app/assets/images/.keep
|
|
408
|
-
- spec/fixtures/rails4_users_app/app/assets/javascripts/application.js
|
|
409
|
-
- spec/fixtures/rails4_users_app/app/assets/stylesheets/application.css
|
|
410
|
-
- spec/fixtures/rails4_users_app/app/controllers/api/users_controller.rb
|
|
411
|
-
- spec/fixtures/rails4_users_app/app/controllers/application_controller.rb
|
|
412
|
-
- spec/fixtures/rails4_users_app/app/controllers/concerns/.keep
|
|
413
|
-
- spec/fixtures/rails4_users_app/app/controllers/health_controller.rb
|
|
414
|
-
- spec/fixtures/rails4_users_app/app/controllers/users_controller.rb
|
|
415
|
-
- spec/fixtures/rails4_users_app/app/helpers/application_helper.rb
|
|
416
|
-
- spec/fixtures/rails4_users_app/app/mailers/.keep
|
|
417
|
-
- spec/fixtures/rails4_users_app/app/models/.keep
|
|
418
|
-
- spec/fixtures/rails4_users_app/app/models/concerns/.keep
|
|
419
|
-
- spec/fixtures/rails4_users_app/app/models/user.rb
|
|
420
|
-
- spec/fixtures/rails4_users_app/app/views/layouts/application.html.haml
|
|
421
|
-
- spec/fixtures/rails4_users_app/app/views/users/index.html.haml
|
|
422
|
-
- spec/fixtures/rails4_users_app/appmap.yml
|
|
423
|
-
- spec/fixtures/rails4_users_app/bin/rails
|
|
424
|
-
- spec/fixtures/rails4_users_app/bin/setup
|
|
425
|
-
- spec/fixtures/rails4_users_app/bin/spring
|
|
426
|
-
- spec/fixtures/rails4_users_app/config.ru
|
|
427
|
-
- spec/fixtures/rails4_users_app/config/application.rb
|
|
428
|
-
- spec/fixtures/rails4_users_app/config/boot.rb
|
|
429
|
-
- spec/fixtures/rails4_users_app/config/database.yml
|
|
430
|
-
- spec/fixtures/rails4_users_app/config/environment.rb
|
|
431
|
-
- spec/fixtures/rails4_users_app/config/environments/development.rb
|
|
432
|
-
- spec/fixtures/rails4_users_app/config/environments/production.rb
|
|
433
|
-
- spec/fixtures/rails4_users_app/config/environments/test.rb
|
|
434
|
-
- spec/fixtures/rails4_users_app/config/initializers/assets.rb
|
|
435
|
-
- spec/fixtures/rails4_users_app/config/initializers/backtrace_silencers.rb
|
|
436
|
-
- spec/fixtures/rails4_users_app/config/initializers/cookies_serializer.rb
|
|
437
|
-
- spec/fixtures/rails4_users_app/config/initializers/filter_parameter_logging.rb
|
|
438
|
-
- spec/fixtures/rails4_users_app/config/initializers/inflections.rb
|
|
439
|
-
- spec/fixtures/rails4_users_app/config/initializers/mime_types.rb
|
|
440
|
-
- spec/fixtures/rails4_users_app/config/initializers/session_store.rb
|
|
441
|
-
- spec/fixtures/rails4_users_app/config/initializers/to_time_preserves_timezone.rb
|
|
442
|
-
- spec/fixtures/rails4_users_app/config/initializers/wrap_parameters.rb
|
|
443
|
-
- spec/fixtures/rails4_users_app/config/locales/en.yml
|
|
444
|
-
- spec/fixtures/rails4_users_app/config/routes.rb
|
|
445
|
-
- spec/fixtures/rails4_users_app/config/secrets.yml
|
|
446
|
-
- spec/fixtures/rails4_users_app/create_app
|
|
447
|
-
- spec/fixtures/rails4_users_app/db/migrate/20191127112304_create_users.rb
|
|
448
|
-
- spec/fixtures/rails4_users_app/db/schema.rb
|
|
449
|
-
- spec/fixtures/rails4_users_app/db/seeds.rb
|
|
450
|
-
- spec/fixtures/rails4_users_app/docker-compose.yml
|
|
451
|
-
- spec/fixtures/rails4_users_app/lib/assets/.keep
|
|
452
|
-
- spec/fixtures/rails4_users_app/lib/tasks/.keep
|
|
453
|
-
- spec/fixtures/rails4_users_app/log/.keep
|
|
454
|
-
- spec/fixtures/rails4_users_app/public/404.html
|
|
455
|
-
- spec/fixtures/rails4_users_app/public/422.html
|
|
456
|
-
- spec/fixtures/rails4_users_app/public/500.html
|
|
457
|
-
- spec/fixtures/rails4_users_app/public/favicon.ico
|
|
458
|
-
- spec/fixtures/rails4_users_app/public/robots.txt
|
|
459
|
-
- spec/fixtures/rails4_users_app/spec/controllers/users_controller_api_spec.rb
|
|
460
|
-
- spec/fixtures/rails4_users_app/spec/rails_helper.rb
|
|
461
|
-
- spec/fixtures/rails4_users_app/spec/spec_helper.rb
|
|
462
|
-
- spec/fixtures/rails4_users_app/test/fixtures/users.yml
|
|
463
398
|
- spec/fixtures/rails5_users_app/.dockerignore
|
|
464
399
|
- spec/fixtures/rails5_users_app/.gitignore
|
|
465
400
|
- spec/fixtures/rails5_users_app/.rspec
|
|
@@ -608,7 +543,6 @@ files:
|
|
|
608
543
|
- spec/open_spec.rb
|
|
609
544
|
- spec/rails_spec_helper.rb
|
|
610
545
|
- spec/railtie_spec.rb
|
|
611
|
-
- spec/record_sql_rails4_pg_spec.rb
|
|
612
546
|
- spec/record_sql_rails_pg_spec.rb
|
|
613
547
|
- spec/remote_recording_spec.rb
|
|
614
548
|
- spec/rspec_feature_metadata_spec.rb
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
require 'rails_spec_helper'
|
|
2
|
-
|
|
3
|
-
describe 'AbstractControllerBase' do
|
|
4
|
-
include_context 'Rails app pg database', 'spec/fixtures/rails4_users_app' do
|
|
5
|
-
around(:each) do |example|
|
|
6
|
-
FileUtils.rm_rf tmpdir
|
|
7
|
-
FileUtils.mkdir_p tmpdir
|
|
8
|
-
cmd = "docker-compose run --rm -e APPMAP=true -v #{File.absolute_path tmpdir}:/app/tmp app ./bin/rspec spec/controllers/users_controller_api_spec.rb:8"
|
|
9
|
-
run_cmd cmd, chdir: fixture_dir
|
|
10
|
-
|
|
11
|
-
example.run
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
let(:tmpdir) { 'tmp/spec/AbstractControllerBase' }
|
|
15
|
-
let(:appmap_json) { File.join(tmpdir, 'appmap/rspec/Api_UsersController_POST_api_users_with_required_parameters_creates_a_user.appmap.json') }
|
|
16
|
-
|
|
17
|
-
describe 'testing with rspec' do
|
|
18
|
-
it 'Message fields are recorded in the appmap' do
|
|
19
|
-
expect(File).to exist(appmap_json)
|
|
20
|
-
appmap = JSON.parse(File.read(appmap_json)).to_yaml
|
|
21
|
-
|
|
22
|
-
expect(appmap).to include(<<-MESSAGE.strip)
|
|
23
|
-
message:
|
|
24
|
-
- name: login
|
|
25
|
-
class: String
|
|
26
|
-
value: alice
|
|
27
|
-
object_id:
|
|
28
|
-
MESSAGE
|
|
29
|
-
|
|
30
|
-
expect(appmap).to include(<<-MESSAGE.strip)
|
|
31
|
-
- name: password
|
|
32
|
-
class: String
|
|
33
|
-
value: "[FILTERED]"
|
|
34
|
-
object_id:
|
|
35
|
-
MESSAGE
|
|
36
|
-
|
|
37
|
-
expect(appmap).to include(<<-SERVER_REQUEST.strip)
|
|
38
|
-
http_server_request:
|
|
39
|
-
request_method: POST
|
|
40
|
-
path_info: "/api/users"
|
|
41
|
-
SERVER_REQUEST
|
|
42
|
-
end
|
|
43
|
-
it 'Properly captures method parameters in the appmap' do
|
|
44
|
-
expect(File).to exist(appmap_json)
|
|
45
|
-
appmap = JSON.parse(File.read(appmap_json)).to_yaml
|
|
46
|
-
|
|
47
|
-
expect(appmap).to match(<<-CREATE_CALL.strip)
|
|
48
|
-
event: call
|
|
49
|
-
thread_id: .*
|
|
50
|
-
defined_class: Api::UsersController
|
|
51
|
-
method_id: build_user
|
|
52
|
-
path: app/controllers/api/users_controller.rb
|
|
53
|
-
lineno: 23
|
|
54
|
-
static: false
|
|
55
|
-
parameters:
|
|
56
|
-
- name: params
|
|
57
|
-
class: Hash
|
|
58
|
-
object_id: .*
|
|
59
|
-
value: '{"login"=>"alice"}'
|
|
60
|
-
kind: req
|
|
61
|
-
receiver:
|
|
62
|
-
CREATE_CALL
|
|
63
|
-
end
|
|
64
|
-
end
|
|
65
|
-
end
|
|
66
|
-
end
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
|
2
|
-
#
|
|
3
|
-
# If you find yourself ignoring temporary files generated by your text editor
|
|
4
|
-
# or operating system, you probably want to add a global ignore instead:
|
|
5
|
-
# git config --global core.excludesfile '~/.gitignore_global'
|
|
6
|
-
|
|
7
|
-
# Ignore bundler config.
|
|
8
|
-
/.bundle
|
|
9
|
-
|
|
10
|
-
# Ignore all logfiles and tempfiles.
|
|
11
|
-
/log/*
|
|
12
|
-
!/log/.keep
|
|
13
|
-
/tmp
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2.5.1
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
ARG GEM_VERSION
|
|
2
|
-
ARG RUBY_VERSION
|
|
3
|
-
|
|
4
|
-
FROM appmap:${GEM_VERSION} as appmap
|
|
5
|
-
|
|
6
|
-
FROM ruby:${RUBY_VERSION}
|
|
7
|
-
RUN apt-get update && apt-get install -y vim less
|
|
8
|
-
RUN apt-get install -y postgresql-client
|
|
9
|
-
|
|
10
|
-
RUN mkdir /app
|
|
11
|
-
WORKDIR /app
|
|
12
|
-
|
|
13
|
-
RUN gem install -v '~> 1.17' -N bundler
|
|
14
|
-
|
|
15
|
-
COPY Gemfile .
|
|
16
|
-
|
|
17
|
-
RUN bundle
|
|
18
|
-
RUN bundle binstubs --force \
|
|
19
|
-
bundler rake rspec-core
|
|
20
|
-
|
|
21
|
-
COPY . .
|
|
22
|
-
|
|
23
|
-
COPY --from=appmap /pkg/appmap.gem /tmp/
|
|
24
|
-
RUN gem install /tmp/appmap.gem && \
|
|
25
|
-
bundle update --local appmap && \
|
|
26
|
-
bundle binstubs appmap --force
|
|
27
|
-
|
|
28
|
-
EXPOSE 3000
|
|
29
|
-
|
|
30
|
-
HEALTHCHECK --interval=1s --retries=10 CMD curl --fail http://localhost:3000/health || exit 1
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
source 'https://rubygems.org'
|
|
2
|
-
git_source(:github) { |name| "https://github.com/#{name}.git" }
|
|
3
|
-
|
|
4
|
-
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
|
5
|
-
gem 'rails', '4.2.11'
|
|
6
|
-
gem 'haml-rails'
|
|
7
|
-
|
|
8
|
-
# Use postgresql as the database for Active Record
|
|
9
|
-
gem 'pg', '~> 0.15'
|
|
10
|
-
# Use SCSS for stylesheets
|
|
11
|
-
gem 'sass-rails', '~> 5.0'
|
|
12
|
-
# Use Uglifier as compressor for JavaScript assets
|
|
13
|
-
# gem 'uglifier', '>= 1.3.0'
|
|
14
|
-
# Use CoffeeScript for .coffee assets and views
|
|
15
|
-
# gem 'coffee-rails', '~> 4.1.0'
|
|
16
|
-
# See https://github.com/rails/execjs#readme for more supported runtimes
|
|
17
|
-
# gem 'therubyracer', platforms: :ruby
|
|
18
|
-
|
|
19
|
-
# Use jquery as the JavaScript library
|
|
20
|
-
# gem 'jquery-rails'
|
|
21
|
-
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
|
|
22
|
-
gem 'turbolinks'
|
|
23
|
-
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
|
24
|
-
gem 'jbuilder', '~> 2.0'
|
|
25
|
-
# bundle exec rake doc:rails generates the API under doc/api.
|
|
26
|
-
gem 'sdoc', '~> 0.4.0', group: :doc
|
|
27
|
-
|
|
28
|
-
# Use ActiveModel has_secure_password
|
|
29
|
-
gem 'bcrypt', '~> 3.1.7'
|
|
30
|
-
|
|
31
|
-
# Use Unicorn as the app server
|
|
32
|
-
# gem 'unicorn'
|
|
33
|
-
|
|
34
|
-
# Use Capistrano for deployment
|
|
35
|
-
# gem 'capistrano-rails', group: :development
|
|
36
|
-
|
|
37
|
-
appmap_path = \
|
|
38
|
-
# Support debugging inside the container with volume-mounted source
|
|
39
|
-
if File.directory?('/src/appmap-ruby')
|
|
40
|
-
'/src/appmap-ruby'
|
|
41
|
-
elsif File.exist?('../../../appmap.gemspec')
|
|
42
|
-
'../../..'
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
if appmap_path
|
|
46
|
-
# Set the branch parameter, so that 'bundle config local.appmap' will work
|
|
47
|
-
appmap_branch = Dir.chdir appmap_path do
|
|
48
|
-
`git rev-parse --abbrev-ref HEAD`.strip
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
appmap_options = \
|
|
53
|
-
if appmap_path && appmap_branch
|
|
54
|
-
{ git: appmap_path, branch: appmap_branch }
|
|
55
|
-
elsif appmap_path
|
|
56
|
-
{ path: appmap_path }
|
|
57
|
-
else
|
|
58
|
-
{}
|
|
59
|
-
end.merge(require: %w[appmap appmap/railtie])
|
|
60
|
-
|
|
61
|
-
gem 'appmap', appmap_options
|
|
62
|
-
|
|
63
|
-
group :development, :test do
|
|
64
|
-
gem 'rspec-rails'
|
|
65
|
-
gem 'database_cleaner'
|
|
66
|
-
|
|
67
|
-
gem 'pry-byebug'
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
group :development do
|
|
71
|
-
# Access an IRB console on exception pages or by using <%= console %> in views
|
|
72
|
-
gem 'web-console', '~> 2.0'
|
|
73
|
-
|
|
74
|
-
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
|
75
|
-
gem 'spring'
|
|
76
|
-
end
|
|
77
|
-
|