burp_cms 1.3.29 → 1.3.30
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/lib/burp/version.rb +1 -1
- data/lib/tasks/burp_tasks.rake +38 -43
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d744d6c79835e7ad19ee848fe5dc5a893a0f45a5
|
4
|
+
data.tar.gz: 04120147b5eae6329a925f878629ecf30e4b8876
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dee0d584ca843a98d99952250a80184ae4e7d81601223b82666e26b4c00eba0fe93fc702b2f24f6f4d499bbd29628cdc402879c8c2e0ffb62b22b2f172424de6
|
7
|
+
data.tar.gz: 0e66197d1e6ea569e9c347df2f7b8c2a27ae9a5492d0d83e3c70f87f1fd4bb1fa1f5af959804f9921cdc48c5f3f335ec5842f1925b36fd777225c1bddb2aef6d
|
data/lib/burp/version.rb
CHANGED
data/lib/tasks/burp_tasks.rake
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'fileutils'
|
2
2
|
require 'term/ansicolor'
|
3
3
|
|
4
|
-
class
|
4
|
+
class BurpRakeHelper
|
5
5
|
extend Term::ANSIColor
|
6
6
|
|
7
7
|
def self.print_yellow text
|
@@ -11,6 +11,22 @@ class MyPrinter
|
|
11
11
|
def self.print_green text
|
12
12
|
print green, text, reset, "\n"
|
13
13
|
end
|
14
|
+
|
15
|
+
|
16
|
+
def self.write(path)
|
17
|
+
css_path = "#{Rails.root}#{path}"
|
18
|
+
print "\t#{css_path}"
|
19
|
+
if File.exist?(css_path)
|
20
|
+
BurpRakeHelper.print_yellow " Skipping"
|
21
|
+
else
|
22
|
+
FileUtils.mkdir_p(File.dirname(css_path))
|
23
|
+
File.open(css_path,"w") do |file|
|
24
|
+
yield file
|
25
|
+
end
|
26
|
+
BurpRakeHelper.print_green " OK"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
14
30
|
end
|
15
31
|
|
16
32
|
namespace :burp do
|
@@ -23,66 +39,45 @@ namespace :burp do
|
|
23
39
|
|
24
40
|
print "\t#{cms_root}"
|
25
41
|
if File.exist?(cms_root)
|
26
|
-
|
42
|
+
BurpRakeHelper.print_yellow " Skipping"
|
27
43
|
else
|
28
44
|
FileUtils.mkdir_p(cms_root)
|
29
|
-
|
45
|
+
BurpRakeHelper.print_green " OK"
|
30
46
|
end
|
31
47
|
|
32
48
|
print "\t#{cms_root}/.git"
|
33
49
|
if File.exist?("#{cms_root}/.git")
|
34
|
-
|
50
|
+
BurpRakeHelper.print_yellow " Skipping"
|
35
51
|
else
|
36
52
|
`git init #{cms_root}`
|
37
|
-
|
53
|
+
BurpRakeHelper.print_green " OK"
|
38
54
|
end
|
39
55
|
|
40
|
-
|
41
|
-
|
42
|
-
if File.exist?(menu_path)
|
43
|
-
MyPrinter.print_yellow " Skipping"
|
44
|
-
else
|
45
|
-
FileUtils.mkdir_p(File.dirname(menu_path))
|
46
|
-
File.open(menu_path,"w") do |file|
|
47
|
-
file.write("---\n:name: root\n:children:\n")
|
48
|
-
end
|
49
|
-
MyPrinter.print_green " OK"
|
56
|
+
BurpRakeHelper.write('/app/cms/menus/main.yaml') do |file|
|
57
|
+
file.write("---\n:name: root\n:children:\n")
|
50
58
|
end
|
51
59
|
|
52
|
-
|
53
|
-
|
54
|
-
if File.exist?(js_path)
|
55
|
-
MyPrinter.print_yellow " Skipping"
|
56
|
-
else
|
57
|
-
File.open(js_path,"w") do |file|
|
58
|
-
file.write("// Includes burp related javascript.\n//\n//= require 'burp/editing'\n//= require 'burp/cms_helper'")
|
59
|
-
end
|
60
|
-
MyPrinter.print_green " OK"
|
60
|
+
BurpRakeHelper.write('/app/assets/javascripts/burp.js') do |file|
|
61
|
+
file.write("// Includes burp related javascript.\n//\n//= require 'burp/editing'\n//= require 'burp/cms_helper'")
|
61
62
|
end
|
62
63
|
|
63
|
-
|
64
|
-
|
65
|
-
if File.exist?(css_path)
|
66
|
-
MyPrinter.print_yellow " Skipping"
|
67
|
-
else
|
68
|
-
File.open(css_path,"w") do |file|
|
69
|
-
file.write("/*\n * Includes burp related stylesheet.\n *\n *= require 'burp/editing'\n */")
|
70
|
-
end
|
71
|
-
MyPrinter.print_green " OK"
|
64
|
+
BurpRakeHelper.write("/app/assets/stylesheets/burp.css") do |file|
|
65
|
+
file.write("/*\n * Includes burp related stylesheet.\n *\n *= require 'burp/editing'\n */")
|
72
66
|
end
|
73
67
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
68
|
+
BurpRakeHelper.write("/app/assets/stylesheets/customize-burp.less") do |file|
|
69
|
+
file.write("/*\n * Add your customizations to the burp admin here.\n *\n */\n\n")
|
70
|
+
end
|
71
|
+
|
72
|
+
BurpRakeHelper.write("/app/assets/javascripts/customize-burp.js") do |file|
|
73
|
+
file.write("/*\n * Add your customizations to the burp admin here.\n *\n */\n\n")
|
74
|
+
end
|
75
|
+
|
76
|
+
BurpRakeHelper.write("/config/initializers/burp_access.rb") do |file|
|
77
|
+
file.write(%{
|
81
78
|
Rails.application.config.burp_username = "#{Rails.application.class.parent_name.downcase}"
|
82
79
|
Rails.application.config.burp_password = "#{('a'..'z').to_a.shuffle[0,6].join}"
|
83
|
-
|
84
|
-
end
|
85
|
-
MyPrinter.print_green " OK"
|
80
|
+
})
|
86
81
|
end
|
87
82
|
|
88
83
|
puts ""
|