Personal snipepts support added #3351

Merged
merged 28 commits into from Jun 4, 2013

Projects

None yet

5 participants

@Andrew8xx8
Contributor

My first step to implement a good feature:

  • Added new page for snippets managment
  • Added new type of snippets. Personal snippets
  • Added Public/Private snippets support (All projects snippets will be private)
  • Spinach tests for snippets (Whohooo!)

Looks like this:

Screenshot 2013-03-25 02 14 54
 2013-03-25 2 16 18
 2013-03-25 2 20 06

Plans:

  • Search
  • Add versions support
@coveralls

Coverage decreased (-11.61%) when pulling ed4dcf7 on Andrew8xx8:gist into 5f159d4 on gitlabhq:master.

View Details

@coveralls

Coverage decreased (-2.83%) when pulling 611ac72 on Andrew8xx8:gist into 5f159d4 on gitlabhq:master.

View Details

@coveralls

Coverage decreased (-45.14%) when pulling d4543eb on Andrew8xx8:gist into 5f159d4 on gitlabhq:master.

View Details

@coveralls

Coverage decreased (-11.96%) when pulling 033037a on Andrew8xx8:gist into 5f159d4 on gitlabhq:master.

View Details

@randx
Member
randx commented Mar 25, 2013

Looks impressing.
Since I'm a bit busy with some other stuff I'll made a review in a week or something.
Please be patient. And thank you for contribution :)

@NARKOZ NARKOZ commented on an outdated diff Mar 25, 2013
app/controllers/projects/snippets_controller.rb
+ @snippet.save
+
+ if @snippet.valid?
+ redirect_to project_snippet_path(@project, @snippet)
+ else
+ respond_with(@snippet)
+ end
+ end
+
+ def edit
+ end
+
+ def update
+ @snippet.update_attributes(params[:project_snippet])
+
+ if @snippet.valid?
@NARKOZ
NARKOZ Mar 25, 2013 Contributor

if @snippet.update_attributes(params[:project_snippet])

@NARKOZ NARKOZ commented on an outdated diff Mar 25, 2013
config/routes.rb
@@ -39,6 +39,16 @@
get 'help/workflow' => 'help#workflow'
#
+ # Global snippets
+ #
+ resources :snippets do
+ member do
+ get "raw"
+ end
+ end
+ match "/s/:username" => "snippets#user_index", as: :user_snippets, constraints: { username: /.*/ }
@NARKOZ
NARKOZ Mar 25, 2013 Contributor

Replace match with get

@coveralls

Coverage increased (+0.22%) when pulling 3e695ac on Andrew8xx8:gist into 5f159d4 on gitlabhq:master.

View Details

@coveralls

Coverage decreased (-11.68%) when pulling 03de5a5 on Andrew8xx8:gist into 5f159d4 on gitlabhq:master.

View Details

@coveralls

Coverage increased (+0.07%) when pulling e0af7ce on Andrew8xx8:gist into 5f159d4 on gitlabhq:master.

View Details

@Razer6
Member
Razer6 commented Apr 30, 2013

+1

@randx randx merged commit e0af7ce into gitlabhq:master Jun 4, 2013

1 check failed

default The Travis build failed
Details
@randx
Member
randx commented Jun 4, 2013

@Andrew8xx8 yay! Finally got this merged. Thank you for good quality code

@dichen001 dichen001 referenced this pull request in dichen001/Paper-Reading Jun 28, 2016
Open

Summary of the 20 issues in Herbsleb's 2014 FSE paper. #6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment