blue_velvet 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -30,7 +30,7 @@ class Facebook::PageController < ApplicationController
|
|
30
30
|
attribute = Facebook::Attribute.new \
|
31
31
|
name: attribute_name.parameterize,
|
32
32
|
title: attribute_name.titleize,
|
33
|
-
body: attribute_content
|
33
|
+
body: attribute_content.html_safe
|
34
34
|
render partial: 'page_attribute', locals: { attribute: attribute }
|
35
35
|
else
|
36
36
|
render partial: 'attribute_not_found', locals: { attribute_name: "#{attribute_name}" }
|
data/lib/blue_velvet/version.rb
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
module Facebook
|
2
2
|
# Generate configuration for BlueVelvet and Koala.
|
3
3
|
class ConfigGenerator < Rails::Generators::Base
|
4
|
-
desc "Copies Facebook
|
4
|
+
desc "Copies Facebook configuration to your application"
|
5
5
|
source_root File.expand_path('../templates', __FILE__)
|
6
6
|
|
7
7
|
# Edit this file with your Facebook app details
|
8
8
|
def copy_configuration
|
9
9
|
copy_file "facebook.yml", "config/facebook.yml"
|
10
|
-
copy_file "koala.rb", "config/initializers/koala.rb"
|
11
10
|
end
|
12
11
|
end
|
13
12
|
end
|
data/test/dummy/log/test.log
CHANGED
@@ -995,3 +995,216 @@ Processing by Facebook::PageController#about as HTML
|
|
995
995
|
Rendered /Users/necromancer/Code/blue_velvet/app/views/facebook/page/_page_attribute.html.erb (0.9ms)
|
996
996
|
Completed 200 OK in 151ms (Views: 2.4ms | ActiveRecord: 0.0ms)
|
997
997
|
[1m[35m (0.3ms)[0m rollback transaction
|
998
|
+
Connecting to database specified by database.yml
|
999
|
+
[1m[36m (2.9ms)[0m [1mbegin transaction[0m
|
1000
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1001
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1002
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1003
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1004
|
+
Connecting to database specified by database.yml
|
1005
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
1006
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1007
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1008
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1009
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1010
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1011
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1012
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1013
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1014
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1015
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1016
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1017
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1018
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1019
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1020
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1021
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1022
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1023
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1024
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1025
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1026
|
+
Processing by Facebook::PageController#about as HTML
|
1027
|
+
Completed 500 Internal Server Error in 129ms
|
1028
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1029
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1030
|
+
Processing by Facebook::PageController#events as HTML
|
1031
|
+
Completed 500 Internal Server Error in 11ms
|
1032
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1033
|
+
Connecting to database specified by database.yml
|
1034
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
1035
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1036
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1037
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1038
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1039
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1040
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1041
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1042
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1043
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1044
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1045
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1046
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1047
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1048
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1049
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1050
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1051
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1052
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1053
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1054
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1055
|
+
Processing by Facebook::PageController#about as HTML
|
1056
|
+
Completed 500 Internal Server Error in 11ms
|
1057
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1058
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1059
|
+
Processing by Facebook::PageController#events as HTML
|
1060
|
+
Completed 500 Internal Server Error in 11ms
|
1061
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1062
|
+
Connecting to database specified by database.yml
|
1063
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
1064
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1065
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1066
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1067
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1068
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1069
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1070
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1071
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1072
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1073
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1074
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1075
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1076
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1077
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1078
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1079
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1080
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1081
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1082
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1083
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1084
|
+
Processing by Facebook::PageController#about as HTML
|
1085
|
+
Completed 500 Internal Server Error in 11ms
|
1086
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1087
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1088
|
+
Processing by Facebook::PageController#events as HTML
|
1089
|
+
Completed 500 Internal Server Error in 12ms
|
1090
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1091
|
+
Connecting to database specified by database.yml
|
1092
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
1093
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1094
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1095
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1096
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1097
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1098
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1099
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1100
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1101
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1102
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1103
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1104
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1105
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1106
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1107
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1108
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1109
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1110
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1111
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1112
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1113
|
+
Processing by Facebook::PageController#about as HTML
|
1114
|
+
Completed 500 Internal Server Error in 12ms
|
1115
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1116
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1117
|
+
Processing by Facebook::PageController#events as HTML
|
1118
|
+
Completed 500 Internal Server Error in 12ms
|
1119
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1120
|
+
Connecting to database specified by database.yml
|
1121
|
+
[1m[36m (2.9ms)[0m [1mbegin transaction[0m
|
1122
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1123
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1124
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1125
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1126
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1127
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1128
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1129
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1130
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1131
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1132
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1133
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1134
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1135
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1136
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1137
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1138
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1139
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1140
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1141
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1142
|
+
Processing by Facebook::PageController#about as HTML
|
1143
|
+
Completed 500 Internal Server Error in 13ms
|
1144
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1145
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1146
|
+
Processing by Facebook::PageController#events as HTML
|
1147
|
+
Completed 500 Internal Server Error in 13ms
|
1148
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1149
|
+
Connecting to database specified by database.yml
|
1150
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
1151
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1152
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1153
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1154
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1155
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1156
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1157
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1158
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1159
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1160
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1161
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1162
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1163
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1164
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1165
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1166
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1167
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1168
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1169
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1170
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1171
|
+
Processing by Facebook::PageController#about as HTML
|
1172
|
+
Rendered /Users/necromancer/Code/blue_velvet/app/views/facebook/page/_page_attribute.html.erb (3.9ms)
|
1173
|
+
Completed 200 OK in 326ms (Views: 74.6ms | ActiveRecord: 0.0ms)
|
1174
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1175
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1176
|
+
Processing by Facebook::PageController#events as HTML
|
1177
|
+
Rendered /Users/necromancer/Code/blue_velvet/app/views/facebook/page/_attribute_not_found.html.erb (0.9ms)
|
1178
|
+
Completed 200 OK in 34ms (Views: 17.8ms | ActiveRecord: 0.0ms)
|
1179
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1180
|
+
Connecting to database specified by database.yml
|
1181
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
1182
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1183
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1184
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1185
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1186
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1187
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1188
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1189
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1190
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1191
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1192
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1193
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1194
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1195
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1196
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1197
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1198
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1199
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1200
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1201
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1202
|
+
Processing by Facebook::PageController#about as HTML
|
1203
|
+
Rendered /Users/necromancer/Code/blue_velvet/app/views/facebook/page/_page_attribute.html.erb (2.5ms)
|
1204
|
+
Completed 200 OK in 183ms (Views: 12.1ms | ActiveRecord: 0.0ms)
|
1205
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1206
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1207
|
+
Processing by Facebook::PageController#events as HTML
|
1208
|
+
Rendered /Users/necromancer/Code/blue_velvet/app/views/facebook/page/_attribute_not_found.html.erb (0.5ms)
|
1209
|
+
Completed 200 OK in 23ms (Views: 2.0ms | ActiveRecord: 0.0ms)
|
1210
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blue_velvet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-08-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -83,7 +83,6 @@ files:
|
|
83
83
|
- lib/blue_velvet.rb
|
84
84
|
- lib/generators/facebook/config/config_generator.rb
|
85
85
|
- lib/generators/facebook/config/templates/facebook.yml
|
86
|
-
- lib/generators/facebook/config/templates/koala.rb
|
87
86
|
- lib/generators/facebook/config/USAGE
|
88
87
|
- lib/generators/facebook/views/USAGE
|
89
88
|
- lib/generators/facebook/views/views_generator.rb
|
@@ -1,29 +0,0 @@
|
|
1
|
-
require 'koala'
|
2
|
-
|
3
|
-
module Facebook
|
4
|
-
def self.config
|
5
|
-
if Rails.env.staging?
|
6
|
-
ActiveSupport::HashWithIndifferentAccess.new \
|
7
|
-
app_id: ENV['FB_APP_ID'],
|
8
|
-
secret_key: ENV['FB_SECRET_KEY'],
|
9
|
-
page_id: ENV['FB_PAGE_ID']
|
10
|
-
else
|
11
|
-
ActiveSupport::HashWithIndifferentAccess.new \
|
12
|
-
YAML.load_file(Rails.root.join("config/facebook.yml"))[Rails.env]
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
Koala::Facebook::OAuth.class_eval do
|
18
|
-
def initialize_with_default_settings(*args)
|
19
|
-
case args.size
|
20
|
-
when 0, 1
|
21
|
-
raise "application id and/or secret are not specified in the config" unless Facebook.config[:app_id].present? && Facebook.config[:secret_key].present?
|
22
|
-
initialize_without_default_settings(Facebook.config[:app_id], Facebook.config[:secret], args.first)
|
23
|
-
when 2, 3
|
24
|
-
initialize_without_default_settings(*args)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
alias_method_chain :initialize, :default_settings
|
29
|
-
end
|