<commit_before># coding: UTF-8

class Api::Json::LayersController < Api::ApplicationController
  ssl_required :show

  before_filter :load_map

  def index
    @layers = @map.layers
    render_jsonp({ :total_entries => @layers.size,
                   :layers => @layers.map(&:public_values)
                })
  end

  def show
    @layer = Layer[params[:id]]

    respond_to do |format|
      format.tilejson do 
       render :text => "#{params[:callback]}( #{@layer.to_tilejson} )"
      end<commit_msg>Requiring ssl on layerscontroller<commit_after># coding: UTF-8

class Api::Json::LayersController < Api::ApplicationController
  ssl_required :index, :show, :create, :update, :destroy

  before_filter :load_map

  def index
    @layers = @map.layers
    render_jsonp({ :total_entries => @layers.size,
                   :layers => @layers.map(&:public_values)
                })
  end

  def show
    @layer = Layer[params[:id]]

    respond_to do |format|
      format.tilejson do 
       render :text => "#{params[:callback]}( #{@layer.to_tilejson} )"
      end
{'fraction_non_alphanumeric': 0.1308411214953271, 'fraction_numerical': 0.001869158878504673, 'mean_word_length': 2.908759124087591, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7548816', 'n_tokens_mistral': 349, 'n_tokens_neox': 329, 'n_words': 74}