technologist 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/bin/console +2 -6
- data/exe/technologist +22 -0
- data/lib/technologist/framework_detector.rb +3 -1
- data/lib/technologist/frameworks.yml +53 -1
- data/lib/technologist/version.rb +1 -1
- data/technologist.gemspec +1 -0
- metadata +33 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2378b10dae9e8be8a3a908670493e515b460d703
|
4
|
+
data.tar.gz: 97fa566a3d4d81b5b19a6dbac8b22520cf066299
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9fe126a1345093b72fb02131f99b09d533acd2fe34db60102062cf66b77f5f931497bd5d2506b0726a7e756188a002b27916d502c087f1034ba13298661c185
|
7
|
+
data.tar.gz: 1f447477bbba87d7d84caa8d9ec7dfafbc7cc283772451cae00912ea17969155779eeb2d40021e67adec77598f782c06fb96223cef7a22abd6daf533fc8a867c
|
data/.gitignore
CHANGED
data/bin/console
CHANGED
@@ -6,9 +6,5 @@ require "technologist"
|
|
6
6
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
7
|
# with your gem easier. You can also use a different console, if you like.
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start
|
9
|
+
require "pry"
|
10
|
+
Pry.start
|
data/exe/technologist
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "technologist"
|
4
|
+
|
5
|
+
def framework_report(title, frameworks)
|
6
|
+
return if frameworks.empty?
|
7
|
+
puts title
|
8
|
+
frameworks.each do |framework|
|
9
|
+
puts "* #{framework}"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
path = ARGV[0] || Dir.pwd
|
14
|
+
|
15
|
+
result = Technologist::Repository.new(path)
|
16
|
+
|
17
|
+
if result.primary_frameworks.empty? && result.secondary_frameworks.empty?
|
18
|
+
puts "No known frameworks could be detected."
|
19
|
+
else
|
20
|
+
framework_report('Primary Frameworks', result.primary_frameworks)
|
21
|
+
framework_report('Secondary Frameworks', result.secondary_frameworks)
|
22
|
+
end
|
@@ -2,6 +2,8 @@ require 'yaml'
|
|
2
2
|
|
3
3
|
module Technologist
|
4
4
|
class FrameworkDetector
|
5
|
+
FRAMEWORK_RULES = File.expand_path('../frameworks.yml', __FILE__)
|
6
|
+
|
5
7
|
def initialize(repository)
|
6
8
|
@repository = repository
|
7
9
|
end
|
@@ -26,7 +28,7 @@ module Technologist
|
|
26
28
|
attr_reader :repository
|
27
29
|
|
28
30
|
def rules
|
29
|
-
@rules ||= YAML.load_file(
|
31
|
+
@rules ||= YAML.load_file(FRAMEWORK_RULES)
|
30
32
|
end
|
31
33
|
|
32
34
|
def matched_frameworks
|
@@ -1,6 +1,8 @@
|
|
1
1
|
Rails:
|
2
2
|
rules:
|
3
3
|
- !ruby/object:GemRule {}
|
4
|
+
- !ruby/object:GemRule { gem_name: 'jrails' }
|
5
|
+
- !ruby/object:FileContentRule { file_name: 'boot.rb', file_content_pattern: 'Rails.boot!' }
|
4
6
|
|
5
7
|
Locomotive:
|
6
8
|
rules:
|
@@ -31,9 +33,59 @@ Meteor:
|
|
31
33
|
|
32
34
|
Spree:
|
33
35
|
rules:
|
34
|
-
- !ruby/object:GemRule {
|
36
|
+
- !ruby/object:GemRule {}
|
37
|
+
- !ruby/object:FileContentRule { file_name: 'boot.rb', file_content_pattern: 'Spree.boot!' }
|
35
38
|
primary: Rails
|
36
39
|
|
37
40
|
Wordpress:
|
38
41
|
rules:
|
39
42
|
- !ruby/object:FilePresenceRule { file_name: 'wp-settings.php' }
|
43
|
+
|
44
|
+
Volt:
|
45
|
+
rules:
|
46
|
+
- !ruby/object:GemRule {}
|
47
|
+
|
48
|
+
Ionic:
|
49
|
+
rules:
|
50
|
+
- !ruby/object:FilePresenceRule { file_name: 'ionic.project' }
|
51
|
+
|
52
|
+
Node:
|
53
|
+
rules:
|
54
|
+
- !ruby/object:FileContentRule
|
55
|
+
file_name: 'package.json'
|
56
|
+
file_content_pattern: '"engines":\s*{\s*"node":'
|
57
|
+
|
58
|
+
Hoodie:
|
59
|
+
rules:
|
60
|
+
- !ruby/object:FileContentRule
|
61
|
+
file_name: 'package.json'
|
62
|
+
file_content_pattern: '"hoodie":\s*{'
|
63
|
+
primary: Node
|
64
|
+
|
65
|
+
PrestaShop:
|
66
|
+
rules:
|
67
|
+
- !ruby/object:FileContentRule { file_name: 'init.php', file_content_pattern: 'PrestaShop' }
|
68
|
+
|
69
|
+
Cordova:
|
70
|
+
rules:
|
71
|
+
- !ruby/object:FileContentRule
|
72
|
+
file_name: 'config.xml'
|
73
|
+
file_content_pattern: '\bxmlns:cdv="http://cordova.apache.org/ns/.+"'
|
74
|
+
|
75
|
+
iOS:
|
76
|
+
rules:
|
77
|
+
- !ruby/object:FileContentRule
|
78
|
+
file_name: 'project.pbxproj'
|
79
|
+
file_content_pattern: '\n\s*SDKROOT = iphoneos;\n'
|
80
|
+
|
81
|
+
Refinery CMS:
|
82
|
+
rules:
|
83
|
+
- !ruby/object:GemRule { gem_name: 'refinerycms' }
|
84
|
+
primary: Rails
|
85
|
+
|
86
|
+
Rack:
|
87
|
+
rules:
|
88
|
+
- !ruby/object:GemRule { gem_name: 'rack' }
|
89
|
+
- !ruby/object:FileContentRule
|
90
|
+
file_name: config.ru
|
91
|
+
file_content_pattern: 'run Proc\.new { \|env\|'
|
data/lib/technologist/version.rb
CHANGED
data/technologist.gemspec
CHANGED
metadata
CHANGED
@@ -1,82 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: technologist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexis Reigel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rugged
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.23.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.23.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.7'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.7'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '10.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '10.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '3.3'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.3'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.10'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.10'
|
69
83
|
description: Detects technologies in a repository by applying a set of rules and returning
|
70
84
|
primary and secondary frameworks.
|
71
85
|
email:
|
72
86
|
- mail@koffeinfrei.org
|
73
|
-
executables:
|
87
|
+
executables:
|
88
|
+
- technologist
|
74
89
|
extensions: []
|
75
90
|
extra_rdoc_files: []
|
76
91
|
files:
|
77
|
-
-
|
78
|
-
-
|
79
|
-
-
|
92
|
+
- .gitignore
|
93
|
+
- .rspec
|
94
|
+
- .travis.yml
|
80
95
|
- CODE_OF_CONDUCT.md
|
81
96
|
- Gemfile
|
82
97
|
- LICENSE
|
@@ -84,6 +99,7 @@ files:
|
|
84
99
|
- Rakefile
|
85
100
|
- bin/console
|
86
101
|
- bin/setup
|
102
|
+
- exe/technologist
|
87
103
|
- lib/technologist.rb
|
88
104
|
- lib/technologist/framework_detector.rb
|
89
105
|
- lib/technologist/frameworks.yml
|
@@ -106,17 +122,17 @@ require_paths:
|
|
106
122
|
- lib
|
107
123
|
required_ruby_version: !ruby/object:Gem::Requirement
|
108
124
|
requirements:
|
109
|
-
- -
|
125
|
+
- - '>='
|
110
126
|
- !ruby/object:Gem::Version
|
111
127
|
version: '0'
|
112
128
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
129
|
requirements:
|
114
|
-
- -
|
130
|
+
- - '>='
|
115
131
|
- !ruby/object:Gem::Version
|
116
132
|
version: '0'
|
117
133
|
requirements: []
|
118
134
|
rubyforge_project:
|
119
|
-
rubygems_version: 2.4.
|
135
|
+
rubygems_version: 2.4.8
|
120
136
|
signing_key:
|
121
137
|
specification_version: 4
|
122
138
|
summary: Detects the technologies used in a repository.
|